Remove promise package (#16030)

This commit is contained in:
Andy
2017-05-01 14:03:24 -07:00
committed by Mohamed Hegazy
parent 7bd8b5865c
commit 3d2aeae311
3 changed files with 0 additions and 75 deletions
-28
View File
@@ -1,28 +0,0 @@
// Type definitions for promise v7.1.1
// Project: https://www.promisejs.org/
// Definitions by: Manuel Rueda <https://github.com/ManRueda>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace Promise;
export = Promise;
declare var Promise: Promise.IPromise;
declare namespace Promise {
export interface IPromise {
new <T>(resolver: (resolve: (value: T) => void, reject: (reason: any) => void) => void): IThenable<T>;
resolve: <T>(value: T) => IThenable<T>;
reject: <T>(value: T) => IThenable<T>;
all: (array: Array<IThenable<any>>) => IThenable<Array<any>>;
denodeify: (fn: Function) => (...args: any[]) => IThenable<any>;
nodeify: (fn: Function) => Function;
}
export interface IThenable<T> {
then<R>(onFulfilled?: (value: T) => IThenable<R>|R, onRejected?: (error: any) => IThenable<R>|R): IThenable<R>;
catch<R>(onRejected?: (error: any) => IThenable<R>|R): IThenable<R>;
done<R>(onFulfilled?: (value: T) => IThenable<R>|R, onRejected?: (error: any) => IThenable<R>|R): IThenable<R>;
nodeify<R>(callback: Function): IThenable<R>;
}
}
-25
View File
@@ -1,25 +0,0 @@
var prom = new Promise<boolean>((resolve, reject) => {
resolve(true);
});
var prom2 = new Promise<boolean>((resolve, reject) => {
resolve(true);
});
prom.then((val) => {
const b: boolean = val;
}).catch(() => {
});
var prom3 = Promise.all([prom, prom2]);
prom3.then((resolve: Array<any>) => {
});
function withCallback(arg: any, cb: (e: Error, result: any) => void): void {
cb(null, arg);
}
var prom4 = Promise.denodeify(withCallback);
prom4('test').then(result => result);
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es5"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"promise-tests.ts"
]
}