From 0e7474da9e658b55157e33ec118effb600e55953 Mon Sep 17 00:00:00 2001 From: pkaul Date: Sun, 16 Mar 2014 18:06:16 +0100 Subject: [PATCH 1/2] Enabling 'when.d.ts' to be also usable as an external module so that is can be included like 'import When = require(../when/when);' --- when/when.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/when/when.d.ts b/when/when.d.ts index 859618852..2af3fba9d 100644 --- a/when/when.d.ts +++ b/when/when.d.ts @@ -78,3 +78,5 @@ declare module When { reason?: any; } } + +export = When; From 98a0894dffe42cbb37a8ccb39eb7e9efb4fb66ad Mon Sep 17 00:00:00 2001 From: pkaul Date: Tue, 18 Mar 2014 22:17:58 +0100 Subject: [PATCH 2/2] Adjusting test after changing when.d.ts. Note: In opposite to other Promise implementation such as" promise-es6" or"Q" the implementation "when.js" is AMD/CommonJS aware und therefore needs to be loaded as an module (e.g. using "requirejs"). --- promises-a-plus/promises-a-plus-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/promises-a-plus/promises-a-plus-tests.ts b/promises-a-plus/promises-a-plus-tests.ts index fa1453645..29ca0989b 100644 --- a/promises-a-plus/promises-a-plus-tests.ts +++ b/promises-a-plus/promises-a-plus-tests.ts @@ -2,7 +2,8 @@ /// /// /// -/// +import When = require("../when/when"); + var thenNum: PromisesAPlus.Thenable; var thenStr: PromisesAPlus.Thenable;