From ce724cf3c161e56bae5c6de74833392f1f348568 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 7 Jul 2017 00:00:05 -0700 Subject: [PATCH] Fix tpromise callback sig for ts 2.4 Fixes #30216 Changes the TPromise callback interface as suggested by https://github.com/Microsoft/vscode/issues/30216#issuecomment-313558951 to fix async functions when compiling using ts 2.4+ --- src/vs/base/common/winjs.base.d.ts | 2 +- src/vs/monaco.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/common/winjs.base.d.ts b/src/vs/base/common/winjs.base.d.ts index 7e3ae270d949d..5cbbf2394a913 100644 --- a/src/vs/base/common/winjs.base.d.ts +++ b/src/vs/base/common/winjs.base.d.ts @@ -47,7 +47,7 @@ export declare class Promise { * The value callback to complete a promise */ export interface TValueCallback { - (value: T): void; + (value: T | Thenable): void; } diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 8e0f447643850..17f13a3cfaad2 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -47,7 +47,7 @@ declare module monaco { * The value callback to complete a promise */ export interface TValueCallback { - (value: T): void; + (value: T | Thenable): void; }