mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Add Jade type definition.
This commit is contained in:
10
jade/jade-tests.ts
Normal file
10
jade/jade-tests.ts
Normal 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
jade/jade.d.ts
vendored
Normal file
19
jade/jade.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Type definitions for jade
|
||||
// Project: https://github.com/jadejs/jade
|
||||
// Definitions by: Panu Horsmalahti <panu.horsmalahti@iki.fi>
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user