DefinitelyTyped/types/coffeeify/index.d.ts
2017-03-24 14:27:52 -07:00

34 lines
906 B
TypeScript

// Type definitions for coffeeify
// Project: https://github.com/jnordberg/coffeeify
// Definitions by: Qubo <https://github.com/tkQubo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import through = require('through');
declare namespace coffeeify {
interface Coffeeify {
isCoffee(file: string): boolean;
isLiterate(file: string): boolean;
sourceMap: boolean;
compile(file: string, data: string, callback: Callback): void;
(file: string): through.ThroughStream;
}
interface Callback {
(error: ParseError, compiled: string): void;
}
interface ParseError extends SyntaxError {
new (error: any, src: string, file: string): ParseError;
message: string;
line: number;
column: number;
annotated: string;
}
}
declare var coffeeify: coffeeify.Coffeeify;
export = coffeeify;