diff --git a/jade/jade-tests.ts b/jade/jade-tests.ts new file mode 100644 index 000000000..8a2b6b48d --- /dev/null +++ b/jade/jade-tests.ts @@ -0,0 +1,10 @@ +/// + +import jade from 'jade'; + +jade.compile("b")(); +jade.compileFile("foo.jade", {})(); +jade.compileClient("a")({ a: 1 }); +jade.compileClientWithDependenciesTracked("test").body(); +jade.render("h1",{}); +jade.renderFile("foo.jade"); \ No newline at end of file diff --git a/jade/jade.d.ts b/jade/jade.d.ts new file mode 100644 index 000000000..9615fa8c8 --- /dev/null +++ b/jade/jade.d.ts @@ -0,0 +1,19 @@ +// Type definitions for jade +// Project: https://github.com/jadejs/jade +// Definitions by: Panu Horsmalahti +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'jade' { + module jade { + function compile(template: string, options?: any): (locals?: any) => string; + function compileFile(path: string, options?: any): (locals?: any) => string; + function compileClient(template: string, options?: any): (locals?: any) => string; + function compileClientWithDependenciesTracked(template: string, options?: any): { + body: (locals?: any) => string; + dependencies: string[]; + }; + function render(template: string, options?: any): string; + function renderFile(path: string, options?: any): string; + } + export default jade; +}