From c69185b594b5a846b84ce1f89864b44cda727df1 Mon Sep 17 00:00:00 2001 From: Georgios Valotasios Date: Sun, 20 Dec 2015 20:58:08 +0100 Subject: [PATCH 1/2] Adapted jade not to have a default export --- jade/jade-tests.ts | 2 +- jade/jade.d.ts | 21 +++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/jade/jade-tests.ts b/jade/jade-tests.ts index 8a2b6b48de..fa11968eaf 100644 --- a/jade/jade-tests.ts +++ b/jade/jade-tests.ts @@ -1,6 +1,6 @@ /// -import jade from 'jade'; +import jade = require('jade'); jade.compile("b")(); jade.compileFile("foo.jade", {})(); diff --git a/jade/jade.d.ts b/jade/jade.d.ts index 9615fa8c87..0764006e56 100644 --- a/jade/jade.d.ts +++ b/jade/jade.d.ts @@ -4,16 +4,13 @@ // 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; + export function compile(template: string, options?: any): (locals?: any) => string; + export function compileFile(path: string, options?: any): (locals?: any) => string; + export function compileClient(template: string, options?: any): (locals?: any) => string; + export function compileClientWithDependenciesTracked(template: string, options?: any): { + body: (locals?: any) => string; + dependencies: string[]; + }; + export function render(template: string, options?: any): string; + export function renderFile(path: string, options?: any): string; } From 2bcb76339897101fcac845fb6c5b3c9507dbb0c7 Mon Sep 17 00:00:00 2001 From: Georgios Valotasios Date: Wed, 23 Dec 2015 10:16:06 +0100 Subject: [PATCH 2/2] Make use of es6 import --- jade/jade-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jade/jade-tests.ts b/jade/jade-tests.ts index fa11968eaf..6b4774021f 100644 --- a/jade/jade-tests.ts +++ b/jade/jade-tests.ts @@ -1,10 +1,10 @@ /// -import jade = require('jade'); +import * as 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 +jade.renderFile("foo.jade");