Merge pull request #6082 from panuhorsmalahti/jade

Add Jade type definition.
This commit is contained in:
Horiuchi_H
2015-10-01 18:02:57 +09:00
2 changed files with 29 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
/// <reference path="jade.d.ts"/>
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");
+19
View File
@@ -0,0 +1,19 @@
// Type definitions for jade
// Project: https://github.com/jadejs/jade
// Definitions by: Panu Horsmalahti <https://github.com/panuhorsmalahti>
// 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;
}