From ab9a0c7a9e5411cd403333a514a5469c93ecebb7 Mon Sep 17 00:00:00 2001 From: Igor Oleinikov Date: Sun, 18 Jan 2015 13:18:24 -0800 Subject: [PATCH] Improved Promises A+ definitions (for TS 1.4) --- promises-a-plus/promises-a-plus.d.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/promises-a-plus/promises-a-plus.d.ts b/promises-a-plus/promises-a-plus.d.ts index 7a3bee7764..e2b23fff0a 100644 --- a/promises-a-plus/promises-a-plus.d.ts +++ b/promises-a-plus/promises-a-plus.d.ts @@ -7,10 +7,7 @@ declare module PromisesAPlus { new (resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): Thenable; } - interface Thenable { - then(onFulfill: (value: R) => Thenable, onReject: (error: any) => Thenable): Thenable; - then(onFulfill: (value: R) => Thenable, onReject?: (error: any) => U): Thenable; - then(onFulfill: (value: R) => U, onReject: (error: any) => Thenable): Thenable; - then(onFulfill?: (value: R) => U, onReject?: (error: any) => U): Thenable; + interface Thenable { + then(onFulfill?: (value: T) => Thenable|R, onReject?: (error: any) => Thenable|R): Thenable; } }