From 2179e38badc9c4954f2f72dd1f1856cf8e623755 Mon Sep 17 00:00:00 2001 From: Panu Horsmalahti Date: Thu, 1 Oct 2015 11:46:34 +0300 Subject: [PATCH 1/2] Add Jade type definition. --- jade/jade-tests.ts | 10 ++++++++++ jade/jade.d.ts | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 jade/jade-tests.ts create mode 100644 jade/jade.d.ts 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..78bfbf1a2 --- /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; +} From 28598f90d12b6972e66962f1e1d06d8ab4d784db Mon Sep 17 00:00:00 2001 From: Panu Horsmalahti Date: Thu, 1 Oct 2015 11:55:32 +0300 Subject: [PATCH 2/2] Change email to url. --- jade/jade.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jade/jade.d.ts b/jade/jade.d.ts index 78bfbf1a2..9615fa8c8 100644 --- a/jade/jade.d.ts +++ b/jade/jade.d.ts @@ -1,6 +1,6 @@ // Type definitions for jade // Project: https://github.com/jadejs/jade -// Definitions by: Panu Horsmalahti +// Definitions by: Panu Horsmalahti // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'jade' {