From 442f5408b6ecb4e4b34986bc161ed9037e5e61b5 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 13 Jan 2017 23:48:20 -0800 Subject: [PATCH] Updated Promise and PromiseLike to use defaults --- src/lib/es2015.promise.d.ts | 35 +- src/lib/es5.d.ts | 34 +- .../asyncFunctionDeclaration15_es5.errors.txt | 4 +- .../reference/inferenceLimit.symbols | 8 +- .../baselines/reference/inferenceLimit.types | 8 +- ...ibrary_NoErrorDuplicateLibOptions1.symbols | 4 +- ...eLibrary_NoErrorDuplicateLibOptions1.types | 4 +- ...ibrary_NoErrorDuplicateLibOptions2.symbols | 4 +- ...eLibrary_NoErrorDuplicateLibOptions2.types | 4 +- ...larizeLibrary_TargetES5UsingES6Lib.symbols | 4 +- ...dularizeLibrary_TargetES5UsingES6Lib.types | 4 +- tests/baselines/reference/promiseType.js | 403 +++-- tests/baselines/reference/promiseType.symbols | 1091 +++++++++---- tests/baselines/reference/promiseType.types | 1448 ++++++++++++----- .../reference/promiseTypeStrictNull.js | 403 +++-- .../reference/promiseTypeStrictNull.symbols | 1091 +++++++++---- .../reference/promiseTypeStrictNull.types | 1448 ++++++++++++----- .../promiseVoidErrorCallback.symbols | 8 +- .../reference/promiseVoidErrorCallback.types | 8 +- tests/cases/compiler/promiseType.ts | 215 ++- tests/cases/compiler/promiseTypeStrictNull.ts | 215 ++- 21 files changed, 4515 insertions(+), 1928 deletions(-) diff --git a/src/lib/es2015.promise.d.ts b/src/lib/es2015.promise.d.ts index e27da2ce11b6c..08ab94a94d596 100644 --- a/src/lib/es2015.promise.d.ts +++ b/src/lib/es2015.promise.d.ts @@ -8,45 +8,14 @@ interface Promise { * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then(onfulfilled?: ((value: T) => T | PromiseLike) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled: ((value: T) => T | PromiseLike) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike): Promise; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; - - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ - catch(onrejected: (reason: any) => TResult | PromiseLike): Promise; + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; } interface PromiseConstructor { diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index e5eabe950a273..2ae09022e0af1 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1316,39 +1316,7 @@ interface PromiseLike { * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ - then( - onfulfilled?: ((value: T) => T | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): PromiseLike; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled: ((value: T) => T | PromiseLike) | undefined | null, - onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled: (value: T) => TResult | PromiseLike, - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): PromiseLike; - - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled: (value: T) => TResult1 | PromiseLike, - onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): PromiseLike; } interface ArrayLike { diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt index 5fa332339124a..a5334d5b9d736 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt @@ -6,7 +6,7 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1 tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. Type 'Thenable' is not assignable to type 'PromiseLike'. Types of property 'then' are incompatible. - Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): PromiseLike; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; }'. + Type '() => void' is not assignable to type '(onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. Type 'void' is not assignable to type 'PromiseLike'. tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. @@ -37,7 +37,7 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1 !!! error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. !!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike'. !!! error TS1055: Types of property 'then' are incompatible. -!!! error TS1055: Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): PromiseLike; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; }'. +!!! error TS1055: Type '() => void' is not assignable to type '(onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. !!! error TS1055: Type 'void' is not assignable to type 'PromiseLike'. async function fn7() { return; } // valid: Promise async function fn8() { return 1; } // valid: Promise diff --git a/tests/baselines/reference/inferenceLimit.symbols b/tests/baselines/reference/inferenceLimit.symbols index 721e7af7560df..dc9e42c52e4b4 100644 --- a/tests/baselines/reference/inferenceLimit.symbols +++ b/tests/baselines/reference/inferenceLimit.symbols @@ -37,14 +37,14 @@ export class BrokenClass { >reject : Symbol(reject, Decl(file1.ts, 13, 34)) this.doStuff(order.id) ->this.doStuff(order.id) .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>this.doStuff(order.id) .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >this.doStuff : Symbol(BrokenClass.doStuff, Decl(file1.ts, 27, 3)) >this : Symbol(BrokenClass, Decl(file1.ts, 1, 39)) >doStuff : Symbol(BrokenClass.doStuff, Decl(file1.ts, 27, 3)) >order : Symbol(order, Decl(file1.ts, 12, 25)) .then((items) => { ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >items : Symbol(items, Decl(file1.ts, 15, 17)) order.items = items; @@ -60,7 +60,7 @@ export class BrokenClass { }; return Promise.all(result.map(populateItems)) ->Promise.all(result.map(populateItems)) .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.all(result.map(populateItems)) .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) @@ -70,7 +70,7 @@ export class BrokenClass { >populateItems : Symbol(populateItems, Decl(file1.ts, 12, 7)) .then((orders: Array) => { ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >orders : Symbol(orders, Decl(file1.ts, 23, 13)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >MyModule : Symbol(MyModule, Decl(file1.ts, 1, 6)) diff --git a/tests/baselines/reference/inferenceLimit.types b/tests/baselines/reference/inferenceLimit.types index c123e21802ecc..bf917e18e93c8 100644 --- a/tests/baselines/reference/inferenceLimit.types +++ b/tests/baselines/reference/inferenceLimit.types @@ -46,7 +46,7 @@ export class BrokenClass { this.doStuff(order.id) >this.doStuff(order.id) .then((items) => { order.items = items; resolve(order); }) : Promise ->this.doStuff(order.id) .then : { (onfulfilled?: (value: void) => void | PromiseLike, onrejected?: (reason: any) => void | PromiseLike): Promise; (onfulfilled: (value: void) => void | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>this.doStuff(order.id) .then : (onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >this.doStuff(order.id) : Promise >this.doStuff : (id: number) => Promise >this : this @@ -56,7 +56,7 @@ export class BrokenClass { >id : any .then((items) => { ->then : { (onfulfilled?: (value: void) => void | PromiseLike, onrejected?: (reason: any) => void | PromiseLike): Promise; (onfulfilled: (value: void) => void | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: void) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >(items) => { order.items = items; resolve(order); } : (items: void) => void >items : void @@ -78,7 +78,7 @@ export class BrokenClass { return Promise.all(result.map(populateItems)) >Promise.all(result.map(populateItems)) .then((orders: Array) => { resolve(orders); }) : Promise ->Promise.all(result.map(populateItems)) .then : { (onfulfilled?: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected?: (reason: any) => {}[] | PromiseLike<{}[]>): Promise<{}[]>; (onfulfilled: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{}[] | TResult>; (onfulfilled: (value: {}[]) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}[]) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>Promise.all(result.map(populateItems)) .then : (onfulfilled?: (value: {}[]) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >Promise.all(result.map(populateItems)) : Promise<{}[]> >Promise.all : { (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; (values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; (values: (T | PromiseLike)[]): Promise; (values: Iterable>): Promise; } >Promise : PromiseConstructor @@ -90,7 +90,7 @@ export class BrokenClass { >populateItems : (order: any) => Promise<{}> .then((orders: Array) => { ->then : { (onfulfilled?: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected?: (reason: any) => {}[] | PromiseLike<{}[]>): Promise<{}[]>; (onfulfilled: (value: {}[]) => {}[] | PromiseLike<{}[]>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{}[] | TResult>; (onfulfilled: (value: {}[]) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}[]) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}[]) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >(orders: Array) => { resolve(orders); } : (orders: MyModule.MyModel[]) => void >orders : MyModule.MyModel[] >Array : T[] diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols index d8520698e6cd3..9516fb0507ed5 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols @@ -121,9 +121,9 @@ declare var console: any; >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 52, 11)) out().then(() => { ->out().then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>out().then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >out : Symbol(out, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 45, 37)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) console.log("Yea!"); >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 52, 11)) diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types index 40b299d63a030..b259e30172d9c 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types @@ -148,10 +148,10 @@ declare var console: any; out().then(() => { >out().then(() => { console.log("Yea!");}) : Promise ->out().then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>out().then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >out() : Promise<{}> >out : () => Promise<{}> ->then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => { console.log("Yea!");} : () => void console.log("Yea!"); diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols index ea1eb599c6fb0..7bafb34fa7d38 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols @@ -121,9 +121,9 @@ declare var console: any; >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 52, 11)) out().then(() => { ->out().then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>out().then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >out : Symbol(out, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 45, 37)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) console.log("Yea!"); >console : Symbol(console, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 52, 11)) diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types index 3022a0ce8b119..4fa4c085bca58 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types @@ -148,10 +148,10 @@ declare var console: any; out().then(() => { >out().then(() => { console.log("Yea!");}) : Promise ->out().then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>out().then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >out() : Promise<{}> >out : () => Promise<{}> ->then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => { console.log("Yea!");} : () => void console.log("Yea!"); diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols index ed1fb96ded3aa..46c0b701b3418 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols @@ -121,9 +121,9 @@ declare var console: any; >console : Symbol(console, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 52, 11)) out().then(() => { ->out().then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>out().then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >out : Symbol(out, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 45, 37)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) console.log("Yea!"); >console : Symbol(console, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 52, 11)) diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types index d98ee87029562..25cd47601e018 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types @@ -148,10 +148,10 @@ declare var console: any; out().then(() => { >out().then(() => { console.log("Yea!");}) : Promise ->out().then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>out().then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >out() : Promise<{}> >out : () => Promise<{}> ->then : { (onfulfilled?: (value: {}) => {} | PromiseLike<{}>, onrejected?: (reason: any) => {} | PromiseLike<{}>): Promise<{}>; (onfulfilled: (value: {}) => {} | PromiseLike<{}>, onrejected: (reason: any) => TResult | PromiseLike): Promise<{} | TResult>; (onfulfilled: (value: {}) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: {}) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: {}) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => { console.log("Yea!");} : () => void console.log("Yea!"); diff --git a/tests/baselines/reference/promiseType.js b/tests/baselines/reference/promiseType.js index 4e42ea240733e..d6b82ebb4d505 100644 --- a/tests/baselines/reference/promiseType.js +++ b/tests/baselines/reference/promiseType.js @@ -1,16 +1,6 @@ //// [promiseType.ts] declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -22,17 +12,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -96,64 +84,140 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); +const p01 = p.then(); -const p10 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); + //// [promiseType.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { @@ -164,16 +228,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); function A() { return __awaiter(this, void 0, void 0, function* () { const a = yield p; @@ -186,17 +240,17 @@ function B() { return 1; }); } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +function C() { + return __awaiter(this, void 0, void 0, function* () { + try { + const a = yield p; + return 1; + } + catch (e) { + return 'error'; + } + }); +} function D() { return __awaiter(this, void 0, void 0, function* () { try { @@ -264,53 +318,124 @@ function I() { } // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => { }); -const p04 = p.catch(() => { throw 1; }); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); -const p10 = p.then(); +const p01 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => { }); +const p17 = p.catch(() => { throw 1; }); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => { }); -const p23 = p.then(() => { throw 1; }); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => { }); +const p27 = p.then(() => { throw 1; }); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => { }); -const p33 = p.then(undefined, () => { throw 1; }); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => { }); -const p43 = p.then(() => "1", () => { throw 1; }); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); -const p50 = p.then(() => { }, undefined); -const p51 = p.then(() => { }, () => 1); -const p52 = p.then(() => { }, () => { }); -const p53 = p.then(() => { }, () => { throw 1; }); -const p54 = p.then(() => { }, () => Promise.resolve(1)); -const p55 = p.then(() => { }, () => Promise.reject(1)); -const p60 = p.then(() => { throw 1; }, undefined); -const p61 = p.then(() => { throw 1; }, () => 1); -const p62 = p.then(() => { throw 1; }, () => { }); -const p63 = p.then(() => { throw 1; }, () => { throw 1; }); -const p64 = p.then(() => { throw 1; }, () => Promise.resolve(1)); -const p65 = p.then(() => { throw 1; }, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => { }); -const p73 = p.then(() => Promise.resolve("1"), () => { throw 1; }); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => { }); -const p83 = p.then(() => Promise.reject(1), () => { throw 1; }); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => { }); +const p37 = p.then(undefined, () => { throw 1; }); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => { }); +const p47 = p.then(null, () => { throw 1; }); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => { }); +const p57 = p.then(() => "1", () => { throw 1; }); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => { }); +const p67 = p.then(() => x, () => { throw 1; }); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => { }); +const p77 = p.then(() => undefined, () => { throw 1; }); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => { }); +const p87 = p.then(() => null, () => { throw 1; }); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); +const p90 = p.then(() => { }, undefined); +const p91 = p.then(() => { }, null); +const p92 = p.then(() => { }, () => 1); +const p93 = p.then(() => { }, () => x); +const p94 = p.then(() => { }, () => undefined); +const p95 = p.then(() => { }, () => null); +const p96 = p.then(() => { }, () => { }); +const p97 = p.then(() => { }, () => { throw 1; }); +const p98 = p.then(() => { }, () => Promise.resolve(1)); +const p99 = p.then(() => { }, () => Promise.reject(1)); +const pa0 = p.then(() => { throw 1; }, undefined); +const pa1 = p.then(() => { throw 1; }, null); +const pa2 = p.then(() => { throw 1; }, () => 1); +const pa3 = p.then(() => { throw 1; }, () => x); +const pa4 = p.then(() => { throw 1; }, () => undefined); +const pa5 = p.then(() => { throw 1; }, () => null); +const pa6 = p.then(() => { throw 1; }, () => { }); +const pa7 = p.then(() => { throw 1; }, () => { throw 1; }); +const pa8 = p.then(() => { throw 1; }, () => Promise.resolve(1)); +const pa9 = p.then(() => { throw 1; }, () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => { }); +const pb7 = p.then(() => Promise.resolve("1"), () => { throw 1; }); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => { }); +const pc7 = p.then(() => Promise.reject("1"), () => { throw 1; }); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); diff --git a/tests/baselines/reference/promiseType.symbols b/tests/baselines/reference/promiseType.symbols index 845aed26d5e32..db99acda97114 100644 --- a/tests/baselines/reference/promiseType.symbols +++ b/tests/baselines/reference/promiseType.symbols @@ -3,149 +3,74 @@ declare var p: Promise; >p : Symbol(p, Decl(promiseType.ts, 0, 11)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) -const a = p.then(); ->a : Symbol(a, Decl(promiseType.ts, 2, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) - -const b = p.then(b => 1); ->b : Symbol(b, Decl(promiseType.ts, 3, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 3, 17)) - -const c = p.then(b => 1, e => 'error'); ->c : Symbol(c, Decl(promiseType.ts, 4, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 4, 17)) ->e : Symbol(e, Decl(promiseType.ts, 4, 24)) - -const d = p.then(b => 1, e => { }); ->d : Symbol(d, Decl(promiseType.ts, 5, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 5, 17)) ->e : Symbol(e, Decl(promiseType.ts, 5, 24)) - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Symbol(e, Decl(promiseType.ts, 6, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 6, 17)) ->e : Symbol(e, Decl(promiseType.ts, 6, 24)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Symbol(f, Decl(promiseType.ts, 7, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseType.ts, 7, 17)) ->e : Symbol(e, Decl(promiseType.ts, 7, 24)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const g = p.catch(e => 'error'); ->g : Symbol(g, Decl(promiseType.ts, 8, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 8, 18)) - -const h = p.catch(e => { }); ->h : Symbol(h, Decl(promiseType.ts, 9, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 9, 18)) - -const i = p.catch(e => { throw Error(); }); ->i : Symbol(i, Decl(promiseType.ts, 10, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 10, 18)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const j = p.catch(e => Promise.reject(Error())); ->j : Symbol(j, Decl(promiseType.ts, 11, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseType.ts, 11, 18)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +declare var x: any; +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) async function A() { ->A : Symbol(A, Decl(promiseType.ts, 11, 48)) +>A : Symbol(A, Decl(promiseType.ts, 1, 19)) const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 14, 9)) +>a : Symbol(a, Decl(promiseType.ts, 4, 9)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 14, 9)) +>a : Symbol(a, Decl(promiseType.ts, 4, 9)) } async function B() { ->B : Symbol(B, Decl(promiseType.ts, 16, 1)) +>B : Symbol(B, Decl(promiseType.ts, 6, 1)) const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 19, 9)) +>a : Symbol(a, Decl(promiseType.ts, 9, 9)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : Symbol(C, Decl(promiseType.ts, 11, 1)) + + try { + const a = await p; +>a : Symbol(a, Decl(promiseType.ts, 15, 13)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) + + return 1; + } + catch (e) { +>e : Symbol(e, Decl(promiseType.ts, 18, 11)) + + return 'error'; + } +} async function D() { >D : Symbol(D, Decl(promiseType.ts, 21, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 37, 13)) +>a : Symbol(a, Decl(promiseType.ts, 25, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 40, 11)) +>e : Symbol(e, Decl(promiseType.ts, 28, 11)) } } async function E() { ->E : Symbol(E, Decl(promiseType.ts, 42, 1)) +>E : Symbol(E, Decl(promiseType.ts, 30, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 46, 13)) +>a : Symbol(a, Decl(promiseType.ts, 34, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 49, 11)) +>e : Symbol(e, Decl(promiseType.ts, 37, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -153,17 +78,17 @@ async function E() { } async function F() { ->F : Symbol(F, Decl(promiseType.ts, 52, 1)) +>F : Symbol(F, Decl(promiseType.ts, 40, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 56, 13)) +>a : Symbol(a, Decl(promiseType.ts, 44, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 59, 11)) +>e : Symbol(e, Decl(promiseType.ts, 47, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -174,36 +99,36 @@ async function F() { } async function G() { ->G : Symbol(G, Decl(promiseType.ts, 62, 1)) +>G : Symbol(G, Decl(promiseType.ts, 50, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 66, 13)) +>a : Symbol(a, Decl(promiseType.ts, 54, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 66, 13)) +>a : Symbol(a, Decl(promiseType.ts, 54, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 69, 11)) +>e : Symbol(e, Decl(promiseType.ts, 57, 11)) return; } } async function H() { ->H : Symbol(H, Decl(promiseType.ts, 72, 1)) +>H : Symbol(H, Decl(promiseType.ts, 60, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 76, 13)) +>a : Symbol(a, Decl(promiseType.ts, 64, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 76, 13)) +>a : Symbol(a, Decl(promiseType.ts, 64, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 79, 11)) +>e : Symbol(e, Decl(promiseType.ts, 67, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -211,18 +136,18 @@ async function H() { } async function I() { ->I : Symbol(I, Decl(promiseType.ts, 82, 1)) +>I : Symbol(I, Decl(promiseType.ts, 70, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseType.ts, 86, 13)) +>a : Symbol(a, Decl(promiseType.ts, 74, 13)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseType.ts, 86, 13)) +>a : Symbol(a, Decl(promiseType.ts, 74, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseType.ts, 89, 11)) +>e : Symbol(e, Decl(promiseType.ts, 77, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -235,390 +160,916 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); ->p00 : Symbol(p00, Decl(promiseType.ts, 96, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>p00 : Symbol(p00, Decl(promiseType.ts, 84, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) + +const p01 = p.then(); +>p01 : Symbol(p01, Decl(promiseType.ts, 85, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p01 = p.catch(undefined); ->p01 : Symbol(p01, Decl(promiseType.ts, 97, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p10 = p.catch(undefined); +>p10 : Symbol(p10, Decl(promiseType.ts, 87, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p07 = p.catch(null); ->p07 : Symbol(p07, Decl(promiseType.ts, 98, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p11 = p.catch(null); +>p11 : Symbol(p11, Decl(promiseType.ts, 88, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) -const p02 = p.catch(() => 1); ->p02 : Symbol(p02, Decl(promiseType.ts, 99, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p12 = p.catch(() => 1); +>p12 : Symbol(p12, Decl(promiseType.ts, 89, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) -const p03 = p.catch(() => {}); ->p03 : Symbol(p03, Decl(promiseType.ts, 100, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p13 = p.catch(() => x); +>p13 : Symbol(p13, Decl(promiseType.ts, 90, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p04 = p.catch(() => {throw 1}); ->p04 : Symbol(p04, Decl(promiseType.ts, 101, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p14 = p.catch(() => undefined); +>p14 : Symbol(p14, Decl(promiseType.ts, 91, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p15 = p.catch(() => null); +>p15 : Symbol(p15, Decl(promiseType.ts, 92, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) + +const p16 = p.catch(() => {}); +>p16 : Symbol(p16, Decl(promiseType.ts, 93, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) + +const p17 = p.catch(() => {throw 1}); +>p17 : Symbol(p17, Decl(promiseType.ts, 94, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Symbol(p05, Decl(promiseType.ts, 102, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Symbol(p18, Decl(promiseType.ts, 95, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Symbol(p06, Decl(promiseType.ts, 103, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Symbol(p19, Decl(promiseType.ts, 96, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p10 = p.then(); ->p10 : Symbol(p10, Decl(promiseType.ts, 105, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p20 = p.then(undefined); +>p20 : Symbol(p20, Decl(promiseType.ts, 98, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p20 = p.then(undefined); ->p20 : Symbol(p20, Decl(promiseType.ts, 107, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p21 = p.then(null); +>p21 : Symbol(p21, Decl(promiseType.ts, 99, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p22 = p.then(() => 1); +>p22 : Symbol(p22, Decl(promiseType.ts, 100, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p23 = p.then(() => x); +>p23 : Symbol(p23, Decl(promiseType.ts, 101, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p24 = p.then(() => undefined); +>p24 : Symbol(p24, Decl(promiseType.ts, 102, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p21 = p.then(() => 1); ->p21 : Symbol(p21, Decl(promiseType.ts, 108, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p25 = p.then(() => null); +>p25 : Symbol(p25, Decl(promiseType.ts, 103, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p22 = p.then(() => {}); ->p22 : Symbol(p22, Decl(promiseType.ts, 109, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p26 = p.then(() => {}); +>p26 : Symbol(p26, Decl(promiseType.ts, 104, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p23 = p.then(() => {throw 1}); ->p23 : Symbol(p23, Decl(promiseType.ts, 110, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p27 = p.then(() => {throw 1}); +>p27 : Symbol(p27, Decl(promiseType.ts, 105, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Symbol(p24, Decl(promiseType.ts, 111, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Symbol(p28, Decl(promiseType.ts, 106, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p25 = p.then(() => Promise.reject(1)); ->p25 : Symbol(p25, Decl(promiseType.ts, 112, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p29 = p.then(() => Promise.reject(1)); +>p29 : Symbol(p29, Decl(promiseType.ts, 107, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) const p30 = p.then(undefined, undefined); ->p30 : Symbol(p30, Decl(promiseType.ts, 114, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>p30 : Symbol(p30, Decl(promiseType.ts, 109, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p31 = p.then(undefined, null); +>p31 : Symbol(p31, Decl(promiseType.ts, 110, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p32 = p.then(undefined, () => 1); +>p32 : Symbol(p32, Decl(promiseType.ts, 111, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p33 = p.then(undefined, () => x); +>p33 : Symbol(p33, Decl(promiseType.ts, 112, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p34 = p.then(undefined, () => undefined); +>p34 : Symbol(p34, Decl(promiseType.ts, 113, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p35 = p.then(undefined, () => null); +>p35 : Symbol(p35, Decl(promiseType.ts, 114, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p36 = p.then(undefined, () => {}); +>p36 : Symbol(p36, Decl(promiseType.ts, 115, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Symbol(p37, Decl(promiseType.ts, 116, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Symbol(p38, Decl(promiseType.ts, 117, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Symbol(p39, Decl(promiseType.ts, 118, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p40 = p.then(null, undefined); +>p40 : Symbol(p40, Decl(promiseType.ts, 120, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p41 = p.then(null, null); +>p41 : Symbol(p41, Decl(promiseType.ts, 121, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p42 = p.then(null, () => 1); +>p42 : Symbol(p42, Decl(promiseType.ts, 122, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p43 = p.then(null, () => x); +>p43 : Symbol(p43, Decl(promiseType.ts, 123, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p44 = p.then(null, () => undefined); +>p44 : Symbol(p44, Decl(promiseType.ts, 124, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p45 = p.then(null, () => null); +>p45 : Symbol(p45, Decl(promiseType.ts, 125, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p46 = p.then(null, () => {}); +>p46 : Symbol(p46, Decl(promiseType.ts, 126, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p47 = p.then(null, () => {throw 1}); +>p47 : Symbol(p47, Decl(promiseType.ts, 127, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Symbol(p48, Decl(promiseType.ts, 128, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Symbol(p49, Decl(promiseType.ts, 129, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p50 = p.then(() => "1", undefined); +>p50 : Symbol(p50, Decl(promiseType.ts, 131, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p51 = p.then(() => "1", null); +>p51 : Symbol(p51, Decl(promiseType.ts, 132, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p52 = p.then(() => "1", () => 1); +>p52 : Symbol(p52, Decl(promiseType.ts, 133, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p53 = p.then(() => "1", () => x); +>p53 : Symbol(p53, Decl(promiseType.ts, 134, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p54 = p.then(() => "1", () => undefined); +>p54 : Symbol(p54, Decl(promiseType.ts, 135, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p55 = p.then(() => "1", () => null); +>p55 : Symbol(p55, Decl(promiseType.ts, 136, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p56 = p.then(() => "1", () => {}); +>p56 : Symbol(p56, Decl(promiseType.ts, 137, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Symbol(p57, Decl(promiseType.ts, 138, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Symbol(p58, Decl(promiseType.ts, 139, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Symbol(p59, Decl(promiseType.ts, 140, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p60 = p.then(() => x, undefined); +>p60 : Symbol(p60, Decl(promiseType.ts, 142, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p61 = p.then(() => x, null); +>p61 : Symbol(p61, Decl(promiseType.ts, 143, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p62 = p.then(() => x, () => 1); +>p62 : Symbol(p62, Decl(promiseType.ts, 144, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p63 = p.then(() => x, () => x); +>p63 : Symbol(p63, Decl(promiseType.ts, 145, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p64 = p.then(() => x, () => undefined); +>p64 : Symbol(p64, Decl(promiseType.ts, 146, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p65 = p.then(() => x, () => null); +>p65 : Symbol(p65, Decl(promiseType.ts, 147, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p66 = p.then(() => x, () => {}); +>p66 : Symbol(p66, Decl(promiseType.ts, 148, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Symbol(p67, Decl(promiseType.ts, 149, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Symbol(p68, Decl(promiseType.ts, 150, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Symbol(p69, Decl(promiseType.ts, 151, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p70 = p.then(() => undefined, undefined); +>p70 : Symbol(p70, Decl(promiseType.ts, 153, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) >undefined : Symbol(undefined) -const p31 = p.then(undefined, () => 1); ->p31 : Symbol(p31, Decl(promiseType.ts, 115, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p71 = p.then(() => undefined, null); +>p71 : Symbol(p71, Decl(promiseType.ts, 154, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p32 = p.then(undefined, () => {}); ->p32 : Symbol(p32, Decl(promiseType.ts, 116, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p72 = p.then(() => undefined, () => 1); +>p72 : Symbol(p72, Decl(promiseType.ts, 155, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Symbol(p33, Decl(promiseType.ts, 117, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p73 = p.then(() => undefined, () => x); +>p73 : Symbol(p73, Decl(promiseType.ts, 156, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Symbol(p34, Decl(promiseType.ts, 118, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p74 = p.then(() => undefined, () => undefined); +>p74 : Symbol(p74, Decl(promiseType.ts, 157, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p75 = p.then(() => undefined, () => null); +>p75 : Symbol(p75, Decl(promiseType.ts, 158, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p76 = p.then(() => undefined, () => {}); +>p76 : Symbol(p76, Decl(promiseType.ts, 159, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Symbol(p77, Decl(promiseType.ts, 160, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Symbol(p78, Decl(promiseType.ts, 161, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Symbol(p35, Decl(promiseType.ts, 119, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Symbol(p79, Decl(promiseType.ts, 162, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p40 = p.then(() => "1", undefined); ->p40 : Symbol(p40, Decl(promiseType.ts, 121, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p80 = p.then(() => null, undefined); +>p80 : Symbol(p80, Decl(promiseType.ts, 164, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p41 = p.then(() => "1", () => 1); ->p41 : Symbol(p41, Decl(promiseType.ts, 122, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p81 = p.then(() => null, null); +>p81 : Symbol(p81, Decl(promiseType.ts, 165, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p42 = p.then(() => "1", () => {}); ->p42 : Symbol(p42, Decl(promiseType.ts, 123, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p82 = p.then(() => null, () => 1); +>p82 : Symbol(p82, Decl(promiseType.ts, 166, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Symbol(p43, Decl(promiseType.ts, 124, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p83 = p.then(() => null, () => x); +>p83 : Symbol(p83, Decl(promiseType.ts, 167, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Symbol(p44, Decl(promiseType.ts, 125, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p84 = p.then(() => null, () => undefined); +>p84 : Symbol(p84, Decl(promiseType.ts, 168, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p85 = p.then(() => null, () => null); +>p85 : Symbol(p85, Decl(promiseType.ts, 169, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p86 = p.then(() => null, () => {}); +>p86 : Symbol(p86, Decl(promiseType.ts, 170, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Symbol(p87, Decl(promiseType.ts, 171, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Symbol(p88, Decl(promiseType.ts, 172, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Symbol(p45, Decl(promiseType.ts, 126, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Symbol(p89, Decl(promiseType.ts, 173, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p50 = p.then(() => {}, undefined); ->p50 : Symbol(p50, Decl(promiseType.ts, 128, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p90 = p.then(() => {}, undefined); +>p90 : Symbol(p90, Decl(promiseType.ts, 175, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p51 = p.then(() => {}, () => 1); ->p51 : Symbol(p51, Decl(promiseType.ts, 129, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p91 = p.then(() => {}, null); +>p91 : Symbol(p91, Decl(promiseType.ts, 176, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p52 = p.then(() => {}, () => {}); ->p52 : Symbol(p52, Decl(promiseType.ts, 130, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p92 = p.then(() => {}, () => 1); +>p92 : Symbol(p92, Decl(promiseType.ts, 177, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Symbol(p53, Decl(promiseType.ts, 131, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p93 = p.then(() => {}, () => x); +>p93 : Symbol(p93, Decl(promiseType.ts, 178, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Symbol(p54, Decl(promiseType.ts, 132, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p94 = p.then(() => {}, () => undefined); +>p94 : Symbol(p94, Decl(promiseType.ts, 179, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p95 = p.then(() => {}, () => null); +>p95 : Symbol(p95, Decl(promiseType.ts, 180, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p96 = p.then(() => {}, () => {}); +>p96 : Symbol(p96, Decl(promiseType.ts, 181, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Symbol(p97, Decl(promiseType.ts, 182, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Symbol(p98, Decl(promiseType.ts, 183, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Symbol(p55, Decl(promiseType.ts, 133, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Symbol(p99, Decl(promiseType.ts, 184, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Symbol(p60, Decl(promiseType.ts, 135, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Symbol(pa0, Decl(promiseType.ts, 186, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Symbol(p61, Decl(promiseType.ts, 136, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Symbol(pa1, Decl(promiseType.ts, 187, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Symbol(pa2, Decl(promiseType.ts, 188, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Symbol(p62, Decl(promiseType.ts, 137, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Symbol(pa3, Decl(promiseType.ts, 189, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Symbol(p63, Decl(promiseType.ts, 138, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Symbol(pa4, Decl(promiseType.ts, 190, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Symbol(p64, Decl(promiseType.ts, 139, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Symbol(pa5, Decl(promiseType.ts, 191, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Symbol(pa6, Decl(promiseType.ts, 192, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Symbol(pa7, Decl(promiseType.ts, 193, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Symbol(pa8, Decl(promiseType.ts, 194, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Symbol(p65, Decl(promiseType.ts, 140, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Symbol(pa9, Decl(promiseType.ts, 195, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Symbol(p70, Decl(promiseType.ts, 142, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Symbol(pb0, Decl(promiseType.ts, 197, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Symbol(p71, Decl(promiseType.ts, 143, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Symbol(pb1, Decl(promiseType.ts, 198, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Symbol(pb2, Decl(promiseType.ts, 199, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Symbol(p72, Decl(promiseType.ts, 144, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Symbol(pb3, Decl(promiseType.ts, 200, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Symbol(p73, Decl(promiseType.ts, 145, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Symbol(pb4, Decl(promiseType.ts, 201, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Symbol(p74, Decl(promiseType.ts, 146, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Symbol(pb5, Decl(promiseType.ts, 202, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Symbol(pb6, Decl(promiseType.ts, 203, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Symbol(p75, Decl(promiseType.ts, 147, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Symbol(pb7, Decl(promiseType.ts, 204, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Symbol(pb8, Decl(promiseType.ts, 205, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Symbol(pb9, Decl(promiseType.ts, 206, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Symbol(pc0, Decl(promiseType.ts, 208, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Symbol(pc1, Decl(promiseType.ts, 209, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Symbol(pc2, Decl(promiseType.ts, 210, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Symbol(pc3, Decl(promiseType.ts, 211, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseType.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseType.ts, 1, 11)) -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Symbol(p80, Decl(promiseType.ts, 149, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Symbol(pc4, Decl(promiseType.ts, 212, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Symbol(p81, Decl(promiseType.ts, 150, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Symbol(pc5, Decl(promiseType.ts, 213, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Symbol(p82, Decl(promiseType.ts, 151, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Symbol(pc6, Decl(promiseType.ts, 214, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Symbol(p83, Decl(promiseType.ts, 152, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Symbol(pc7, Decl(promiseType.ts, 215, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Symbol(p84, Decl(promiseType.ts, 153, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Symbol(pc8, Decl(promiseType.ts, 216, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -626,11 +1077,11 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Symbol(p85, Decl(promiseType.ts, 154, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Symbol(pc9, Decl(promiseType.ts, 217, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseType.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/promiseType.types b/tests/baselines/reference/promiseType.types index 3d055f73f0a9a..3228d266319f5 100644 --- a/tests/baselines/reference/promiseType.types +++ b/tests/baselines/reference/promiseType.types @@ -3,124 +3,8 @@ declare var p: Promise; >p : Promise >Promise : Promise -const a = p.then(); ->a : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - -const b = p.then(b => 1); ->b : Promise<1> ->p.then(b => 1) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 - -const c = p.then(b => 1, e => 'error'); ->c : Promise ->p.then(b => 1, e => 'error') : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => 'error' : (e: any) => string ->e : any ->'error' : "error" - -const d = p.then(b => 1, e => { }); ->d : Promise ->p.then(b => 1, e => { }) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { } : (e: any) => void ->e : any - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Promise<1> ->p.then(b => 1, e => { throw Error(); }) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Promise<1> ->p.then(b => 1, e => Promise.reject(Error())) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor - -const g = p.catch(e => 'error'); ->g : Promise ->p.catch(e => 'error') : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => 'error' : (e: any) => "error" ->e : any ->'error' : "error" - -const h = p.catch(e => { }); ->h : Promise ->p.catch(e => { }) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { } : (e: any) => void ->e : any - -const i = p.catch(e => { throw Error(); }); ->i : Promise ->p.catch(e => { throw Error(); }) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const j = p.catch(e => Promise.reject(Error())); ->j : Promise ->p.catch(e => Promise.reject(Error())) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor +declare var x: any; +>x : any async function A() { >A : () => Promise @@ -146,17 +30,25 @@ async function B() { >1 : 1 } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : () => Promise<1 | "error"> + + try { + const a = await p; +>a : boolean +>await p : boolean +>p : Promise + + return 1; +>1 : 1 + } + catch (e) { +>e : any + + return 'error'; +>'error' : "error" + } +} async function D() { >D : () => Promise @@ -291,58 +183,92 @@ async function I() { const p00 = p.catch(); >p00 : Promise >p.catch() : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise -const p01 = p.catch(undefined); +const p01 = p.then(); >p01 : Promise +>p.then() : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise + +const p10 = p.catch(undefined); +>p10 : Promise >p.catch(undefined) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >undefined : undefined -const p07 = p.catch(null); ->p07 : Promise +const p11 = p.catch(null); +>p11 : Promise >p.catch(null) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >null : null -const p02 = p.catch(() => 1); ->p02 : Promise ->p.catch(() => 1) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +const p12 = p.catch(() => 1); +>p12 : Promise +>p.catch(() => 1) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->() => 1 : () => 1 +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => 1 : () => number >1 : 1 -const p03 = p.catch(() => {}); ->p03 : Promise +const p13 = p.catch(() => x); +>p13 : Promise +>p.catch(() => x) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>p : Promise +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => x : () => any +>x : any + +const p14 = p.catch(() => undefined); +>p14 : Promise +>p.catch(() => undefined) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>p : Promise +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined + +const p15 = p.catch(() => null); +>p15 : Promise +>p.catch(() => null) : Promise +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>p : Promise +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise +>() => null : () => any +>null : null + +const p16 = p.catch(() => {}); +>p16 : Promise >p.catch(() => {}) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => {} : () => void -const p04 = p.catch(() => {throw 1}); ->p04 : Promise +const p17 = p.catch(() => {throw 1}); +>p17 : Promise >p.catch(() => {throw 1}) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Promise +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Promise >p.catch(() => Promise.reject(1)) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -350,12 +276,12 @@ const p05 = p.catch(() => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Promise +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Promise >p.catch(() => Promise.resolve(1)) : Promise ->p.catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >p : Promise ->catch : { (onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: (reason: any) => TResult | PromiseLike) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -363,53 +289,81 @@ const p06 = p.catch(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p10 = p.then(); ->p10 : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - const p20 = p.then(undefined); >p20 : Promise >p.then(undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined -const p21 = p.then(() => 1); ->p21 : Promise<1> ->p.then(() => 1) : Promise<1> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p21 = p.then(null); +>p21 : Promise +>p.then(null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null + +const p22 = p.then(() => 1); +>p22 : Promise +>p.then(() => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => 1 : () => 1 +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => 1 : () => number >1 : 1 -const p22 = p.then(() => {}); ->p22 : Promise +const p23 = p.then(() => x); +>p23 : Promise +>p.then(() => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any + +const p24 = p.then(() => undefined); +>p24 : Promise +>p.then(() => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined + +const p25 = p.then(() => null); +>p25 : Promise +>p.then(() => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null + +const p26 = p.then(() => {}); +>p26 : Promise >p.then(() => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void -const p23 = p.then(() => {throw 1}); ->p23 : Promise ->p.then(() => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p27 = p.then(() => {throw 1}); +>p27 : Promise +>p.then(() => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Promise +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Promise >p.then(() => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -417,12 +371,12 @@ const p24 = p.then(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p25 = p.then(() => Promise.reject(1)); ->p25 : Promise ->p.then(() => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p29 = p.then(() => Promise.reject(1)); +>p29 : Promise +>p.then(() => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -433,47 +387,86 @@ const p25 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); >p30 : Promise >p.then(undefined, undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >undefined : undefined -const p31 = p.then(undefined, () => 1); ->p31 : Promise ->p.then(undefined, () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p31 = p.then(undefined, null); +>p31 : Promise +>p.then(undefined, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined ->() => 1 : () => 1 +>null : null + +const p32 = p.then(undefined, () => 1); +>p32 : Promise +>p.then(undefined, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => 1 : () => number >1 : 1 -const p32 = p.then(undefined, () => {}); ->p32 : Promise +const p33 = p.then(undefined, () => x); +>p33 : Promise +>p.then(undefined, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => x : () => any +>x : any + +const p34 = p.then(undefined, () => undefined); +>p34 : Promise +>p.then(undefined, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => undefined : () => any +>undefined : undefined + +const p35 = p.then(undefined, () => null); +>p35 : Promise +>p.then(undefined, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>undefined : undefined +>() => null : () => any +>null : null + +const p36 = p.then(undefined, () => {}); +>p36 : Promise >p.then(undefined, () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => {} : () => void -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Promise +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Promise >p.then(undefined, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => {throw 1} : () => never >1 : 1 -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Promise +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Promise >p.then(undefined, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -482,12 +475,12 @@ const p34 = p.then(undefined, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Promise +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Promise >p.then(undefined, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >undefined : undefined >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -496,55 +489,203 @@ const p35 = p.then(undefined, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p40 = p.then(() => "1", undefined); ->p40 : Promise<"1"> ->p.then(() => "1", undefined) : Promise<"1"> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p40 = p.then(null, undefined); +>p40 : Promise +>p.then(null, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>undefined : undefined + +const p41 = p.then(null, null); +>p41 : Promise +>p.then(null, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>null : null + +const p42 = p.then(null, () => 1); +>p42 : Promise +>p.then(null, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => 1 : () => number +>1 : 1 + +const p43 = p.then(null, () => x); +>p43 : Promise +>p.then(null, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => x : () => any +>x : any + +const p44 = p.then(null, () => undefined); +>p44 : Promise +>p.then(null, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => undefined : () => any +>undefined : undefined + +const p45 = p.then(null, () => null); +>p45 : Promise +>p.then(null, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => null : () => any +>null : null + +const p46 = p.then(null, () => {}); +>p46 : Promise +>p.then(null, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => {} : () => void + +const p47 = p.then(null, () => {throw 1}); +>p47 : Promise +>p.then(null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Promise +>p.then(null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Promise +>p.then(null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p50 = p.then(() => "1", undefined); +>p50 : Promise +>p.then(() => "1", undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >undefined : undefined -const p41 = p.then(() => "1", () => 1); ->p41 : Promise ->p.then(() => "1", () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p51 = p.then(() => "1", null); +>p51 : Promise +>p.then(() => "1", null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>null : null + +const p52 = p.then(() => "1", () => 1); +>p52 : Promise +>p.then(() => "1", () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => 1 : () => number >1 : 1 -const p42 = p.then(() => "1", () => {}); ->p42 : Promise ->p.then(() => "1", () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p53 = p.then(() => "1", () => x); +>p53 : Promise +>p.then(() => "1", () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>() => x : () => any +>x : any + +const p54 = p.then(() => "1", () => undefined); +>p54 : Promise +>p.then(() => "1", () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>() => undefined : () => any +>undefined : undefined + +const p55 = p.then(() => "1", () => null); +>p55 : Promise +>p.then(() => "1", () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string +>"1" : "1" +>() => null : () => any +>null : null + +const p56 = p.then(() => "1", () => {}); +>p56 : Promise +>p.then(() => "1", () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => {} : () => void -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Promise<"1"> ->p.then(() => "1", () => {throw 1}) : Promise<"1"> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Promise +>p.then(() => "1", () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Promise ->p.then(() => "1", () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Promise +>p.then(() => "1", () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -553,13 +694,13 @@ const p44 = p.then(() => "1", () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Promise<"1"> ->p.then(() => "1", () => Promise.reject(1)) : Promise<"1"> ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Promise +>p.then(() => "1", () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -568,50 +709,434 @@ const p45 = p.then(() => "1", () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p50 = p.then(() => {}, undefined); ->p50 : Promise +const p60 = p.then(() => x, undefined); +>p60 : Promise +>p.then(() => x, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>undefined : undefined + +const p61 = p.then(() => x, null); +>p61 : Promise +>p.then(() => x, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>null : null + +const p62 = p.then(() => x, () => 1); +>p62 : Promise +>p.then(() => x, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => 1 : () => number +>1 : 1 + +const p63 = p.then(() => x, () => x); +>p63 : Promise +>p.then(() => x, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => x : () => any +>x : any + +const p64 = p.then(() => x, () => undefined); +>p64 : Promise +>p.then(() => x, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => undefined : () => any +>undefined : undefined + +const p65 = p.then(() => x, () => null); +>p65 : Promise +>p.then(() => x, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => null : () => any +>null : null + +const p66 = p.then(() => x, () => {}); +>p66 : Promise +>p.then(() => x, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => {} : () => void + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Promise +>p.then(() => x, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => {throw 1} : () => never +>1 : 1 + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Promise +>p.then(() => x, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Promise +>p.then(() => x, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => x : () => any +>x : any +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p70 = p.then(() => undefined, undefined); +>p70 : Promise +>p.then(() => undefined, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>undefined : undefined + +const p71 = p.then(() => undefined, null); +>p71 : Promise +>p.then(() => undefined, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>null : null + +const p72 = p.then(() => undefined, () => 1); +>p72 : Promise +>p.then(() => undefined, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => 1 : () => number +>1 : 1 + +const p73 = p.then(() => undefined, () => x); +>p73 : Promise +>p.then(() => undefined, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => x : () => any +>x : any + +const p74 = p.then(() => undefined, () => undefined); +>p74 : Promise +>p.then(() => undefined, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => undefined : () => any +>undefined : undefined + +const p75 = p.then(() => undefined, () => null); +>p75 : Promise +>p.then(() => undefined, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => null : () => any +>null : null + +const p76 = p.then(() => undefined, () => {}); +>p76 : Promise +>p.then(() => undefined, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => {} : () => void + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Promise +>p.then(() => undefined, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => {throw 1} : () => never +>1 : 1 + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Promise +>p.then(() => undefined, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Promise +>p.then(() => undefined, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => undefined : () => any +>undefined : undefined +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p80 = p.then(() => null, undefined); +>p80 : Promise +>p.then(() => null, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>undefined : undefined + +const p81 = p.then(() => null, null); +>p81 : Promise +>p.then(() => null, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>null : null + +const p82 = p.then(() => null, () => 1); +>p82 : Promise +>p.then(() => null, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => 1 : () => number +>1 : 1 + +const p83 = p.then(() => null, () => x); +>p83 : Promise +>p.then(() => null, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => x : () => any +>x : any + +const p84 = p.then(() => null, () => undefined); +>p84 : Promise +>p.then(() => null, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => undefined : () => any +>undefined : undefined + +const p85 = p.then(() => null, () => null); +>p85 : Promise +>p.then(() => null, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => null : () => any +>null : null + +const p86 = p.then(() => null, () => {}); +>p86 : Promise +>p.then(() => null, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => {} : () => void + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Promise +>p.then(() => null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Promise +>p.then(() => null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Promise +>p.then(() => null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => null : () => any +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p90 = p.then(() => {}, undefined); +>p90 : Promise >p.then(() => {}, undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >undefined : undefined -const p51 = p.then(() => {}, () => 1); ->p51 : Promise +const p91 = p.then(() => {}, null); +>p91 : Promise +>p.then(() => {}, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>null : null + +const p92 = p.then(() => {}, () => 1); +>p92 : Promise >p.then(() => {}, () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => 1 : () => number >1 : 1 -const p52 = p.then(() => {}, () => {}); ->p52 : Promise +const p93 = p.then(() => {}, () => x); +>p93 : Promise +>p.then(() => {}, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>() => x : () => any +>x : any + +const p94 = p.then(() => {}, () => undefined); +>p94 : Promise +>p.then(() => {}, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>() => undefined : () => any +>undefined : undefined + +const p95 = p.then(() => {}, () => null); +>p95 : Promise +>p.then(() => {}, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {} : () => void +>() => null : () => any +>null : null + +const p96 = p.then(() => {}, () => {}); +>p96 : Promise >p.then(() => {}, () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => {} : () => void -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Promise +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Promise >p.then(() => {}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => {throw 1} : () => never >1 : 1 -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Promise +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Promise >p.then(() => {}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -620,12 +1145,12 @@ const p54 = p.then(() => {}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Promise +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Promise >p.then(() => {}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {} : () => void >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -634,54 +1159,97 @@ const p55 = p.then(() => {}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Promise ->p.then(() => {throw 1}, undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Promise +>p.then(() => {throw 1}, undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >undefined : undefined -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Promise ->p.then(() => {throw 1}, () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Promise +>p.then(() => {throw 1}, null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never +>1 : 1 +>null : null + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Promise +>p.then(() => {throw 1}, () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => 1 : () => number +>1 : 1 + +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Promise +>p.then(() => {throw 1}, () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 ->() => 1 : () => 1 +>() => x : () => any +>x : any + +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Promise +>p.then(() => {throw 1}, () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => undefined : () => any +>undefined : undefined + +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Promise +>p.then(() => {throw 1}, () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => {throw 1} : () => never >1 : 1 +>() => null : () => any +>null : null -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Promise ->p.then(() => {throw 1}, () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Promise +>p.then(() => {throw 1}, () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => {} : () => void -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Promise ->p.then(() => {throw 1}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Promise +>p.then(() => {throw 1}, () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => {throw 1} : () => never >1 : 1 -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Promise ->p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Promise +>p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.resolve(1) : () => Promise @@ -691,12 +1259,12 @@ const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Promise ->p.then(() => {throw 1}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Promise +>p.then(() => {throw 1}, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.reject(1) : () => Promise @@ -706,12 +1274,12 @@ const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Promise +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Promise >p.then(() => Promise.resolve("1"), undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -720,12 +1288,26 @@ const p70 = p.then(() => Promise.resolve("1"), undefined); >"1" : "1" >undefined : undefined -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Promise +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Promise +>p.then(() => Promise.resolve("1"), null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>null : null + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Promise >p.then(() => Promise.resolve("1"), () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -735,12 +1317,57 @@ const p71 = p.then(() => Promise.resolve("1"), () => 1); >() => 1 : () => number >1 : 1 -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Promise +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Promise +>p.then(() => Promise.resolve("1"), () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Promise +>p.then(() => Promise.resolve("1"), () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => undefined : () => any +>undefined : undefined + +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Promise +>p.then(() => Promise.resolve("1"), () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => null : () => any +>null : null + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Promise >p.then(() => Promise.resolve("1"), () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -749,12 +1376,12 @@ const p72 = p.then(() => Promise.resolve("1"), () => {}); >"1" : "1" >() => {} : () => void -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Promise +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Promise >p.then(() => Promise.resolve("1"), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -764,12 +1391,12 @@ const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); >() => {throw 1} : () => never >1 : 1 -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Promise +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Promise >p.then(() => Promise.resolve("1"), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -783,12 +1410,12 @@ const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Promise +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Promise >p.then(() => Promise.resolve("1"), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -802,76 +1429,135 @@ const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Promise ->p.then(() => Promise.reject(1), undefined) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Promise +>p.then(() => Promise.reject("1"), undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >undefined : undefined -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Promise ->p.then(() => Promise.reject(1), () => 1) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Promise +>p.then(() => Promise.reject("1"), null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 ->() => 1 : () => 1 ->1 : 1 +>"1" : "1" +>null : null -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Promise ->p.then(() => Promise.reject(1), () => {}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Promise +>p.then(() => Promise.reject("1"), () => 1) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => 1 : () => number >1 : 1 + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Promise +>p.then(() => Promise.reject("1"), () => x) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Promise +>p.then(() => Promise.reject("1"), () => undefined) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => undefined : () => any +>undefined : undefined + +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Promise +>p.then(() => Promise.reject("1"), () => null) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => null : () => any +>null : null + +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Promise +>p.then(() => Promise.reject("1"), () => {}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>p : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" >() => {} : () => void -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Promise ->p.then(() => Promise.reject(1), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Promise +>p.then(() => Promise.reject("1"), () => {throw 1}) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Promise ->p.then(() => Promise.reject(1), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Promise +>p.then(() => Promise.reject("1"), () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -879,18 +1565,18 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Promise ->p.then(() => Promise.reject(1), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Promise +>p.then(() => Promise.reject("1"), () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p : Promise ->then : { (onfulfilled?: (value: boolean) => boolean | PromiseLike, onrejected?: (reason: any) => boolean | PromiseLike): Promise; (onfulfilled: (value: boolean) => boolean | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: (value: boolean) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } diff --git a/tests/baselines/reference/promiseTypeStrictNull.js b/tests/baselines/reference/promiseTypeStrictNull.js index 4aefeb3403eb5..60e0b9b61dfa6 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.js +++ b/tests/baselines/reference/promiseTypeStrictNull.js @@ -1,16 +1,6 @@ //// [promiseTypeStrictNull.ts] declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -22,17 +12,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -96,64 +84,140 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); +const p01 = p.then(); -const p10 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); + //// [promiseTypeStrictNull.js] var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { @@ -164,16 +228,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); function A() { return __awaiter(this, void 0, void 0, function* () { const a = yield p; @@ -186,17 +240,17 @@ function B() { return 1; }); } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +function C() { + return __awaiter(this, void 0, void 0, function* () { + try { + const a = yield p; + return 1; + } + catch (e) { + return 'error'; + } + }); +} function D() { return __awaiter(this, void 0, void 0, function* () { try { @@ -264,53 +318,124 @@ function I() { } // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => { }); -const p04 = p.catch(() => { throw 1; }); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); -const p10 = p.then(); +const p01 = p.then(); +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => { }); +const p17 = p.catch(() => { throw 1; }); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => { }); -const p23 = p.then(() => { throw 1; }); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => { }); +const p27 = p.then(() => { throw 1; }); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => { }); -const p33 = p.then(undefined, () => { throw 1; }); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => { }); -const p43 = p.then(() => "1", () => { throw 1; }); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); -const p50 = p.then(() => { }, undefined); -const p51 = p.then(() => { }, () => 1); -const p52 = p.then(() => { }, () => { }); -const p53 = p.then(() => { }, () => { throw 1; }); -const p54 = p.then(() => { }, () => Promise.resolve(1)); -const p55 = p.then(() => { }, () => Promise.reject(1)); -const p60 = p.then(() => { throw 1; }, undefined); -const p61 = p.then(() => { throw 1; }, () => 1); -const p62 = p.then(() => { throw 1; }, () => { }); -const p63 = p.then(() => { throw 1; }, () => { throw 1; }); -const p64 = p.then(() => { throw 1; }, () => Promise.resolve(1)); -const p65 = p.then(() => { throw 1; }, () => Promise.reject(1)); -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => { }); -const p73 = p.then(() => Promise.resolve("1"), () => { throw 1; }); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => { }); -const p83 = p.then(() => Promise.reject(1), () => { throw 1; }); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => { }); +const p37 = p.then(undefined, () => { throw 1; }); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => { }); +const p47 = p.then(null, () => { throw 1; }); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => { }); +const p57 = p.then(() => "1", () => { throw 1; }); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => { }); +const p67 = p.then(() => x, () => { throw 1; }); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => { }); +const p77 = p.then(() => undefined, () => { throw 1; }); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => { }); +const p87 = p.then(() => null, () => { throw 1; }); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); +const p90 = p.then(() => { }, undefined); +const p91 = p.then(() => { }, null); +const p92 = p.then(() => { }, () => 1); +const p93 = p.then(() => { }, () => x); +const p94 = p.then(() => { }, () => undefined); +const p95 = p.then(() => { }, () => null); +const p96 = p.then(() => { }, () => { }); +const p97 = p.then(() => { }, () => { throw 1; }); +const p98 = p.then(() => { }, () => Promise.resolve(1)); +const p99 = p.then(() => { }, () => Promise.reject(1)); +const pa0 = p.then(() => { throw 1; }, undefined); +const pa1 = p.then(() => { throw 1; }, null); +const pa2 = p.then(() => { throw 1; }, () => 1); +const pa3 = p.then(() => { throw 1; }, () => x); +const pa4 = p.then(() => { throw 1; }, () => undefined); +const pa5 = p.then(() => { throw 1; }, () => null); +const pa6 = p.then(() => { throw 1; }, () => { }); +const pa7 = p.then(() => { throw 1; }, () => { throw 1; }); +const pa8 = p.then(() => { throw 1; }, () => Promise.resolve(1)); +const pa9 = p.then(() => { throw 1; }, () => Promise.reject(1)); +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => { }); +const pb7 = p.then(() => Promise.resolve("1"), () => { throw 1; }); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => { }); +const pc7 = p.then(() => Promise.reject("1"), () => { throw 1; }); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); diff --git a/tests/baselines/reference/promiseTypeStrictNull.symbols b/tests/baselines/reference/promiseTypeStrictNull.symbols index bf14c51656e05..ee8baa5e8d456 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.symbols +++ b/tests/baselines/reference/promiseTypeStrictNull.symbols @@ -3,149 +3,74 @@ declare var p: Promise; >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) -const a = p.then(); ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 2, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) - -const b = p.then(b => 1); ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 3, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 3, 17)) - -const c = p.then(b => 1, e => 'error'); ->c : Symbol(c, Decl(promiseTypeStrictNull.ts, 4, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 4, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 4, 24)) - -const d = p.then(b => 1, e => { }); ->d : Symbol(d, Decl(promiseTypeStrictNull.ts, 5, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 5, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 5, 24)) - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 6, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 6, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 6, 24)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Symbol(f, Decl(promiseTypeStrictNull.ts, 7, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->b : Symbol(b, Decl(promiseTypeStrictNull.ts, 7, 17)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 7, 24)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const g = p.catch(e => 'error'); ->g : Symbol(g, Decl(promiseTypeStrictNull.ts, 8, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 8, 18)) - -const h = p.catch(e => { }); ->h : Symbol(h, Decl(promiseTypeStrictNull.ts, 9, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 9, 18)) - -const i = p.catch(e => { throw Error(); }); ->i : Symbol(i, Decl(promiseTypeStrictNull.ts, 10, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 10, 18)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) - -const j = p.catch(e => Promise.reject(Error())); ->j : Symbol(j, Decl(promiseTypeStrictNull.ts, 11, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 11, 18)) ->Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +declare var x: any; +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) async function A() { ->A : Symbol(A, Decl(promiseTypeStrictNull.ts, 11, 48)) +>A : Symbol(A, Decl(promiseTypeStrictNull.ts, 1, 19)) const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 14, 9)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 4, 9)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 14, 9)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 4, 9)) } async function B() { ->B : Symbol(B, Decl(promiseTypeStrictNull.ts, 16, 1)) +>B : Symbol(B, Decl(promiseTypeStrictNull.ts, 6, 1)) const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 19, 9)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 9, 9)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : Symbol(C, Decl(promiseTypeStrictNull.ts, 11, 1)) + + try { + const a = await p; +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 15, 13)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) + + return 1; + } + catch (e) { +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 18, 11)) + + return 'error'; + } +} async function D() { >D : Symbol(D, Decl(promiseTypeStrictNull.ts, 21, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 37, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 25, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 40, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 28, 11)) } } async function E() { ->E : Symbol(E, Decl(promiseTypeStrictNull.ts, 42, 1)) +>E : Symbol(E, Decl(promiseTypeStrictNull.ts, 30, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 46, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 34, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 49, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 37, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -153,17 +78,17 @@ async function E() { } async function F() { ->F : Symbol(F, Decl(promiseTypeStrictNull.ts, 52, 1)) +>F : Symbol(F, Decl(promiseTypeStrictNull.ts, 40, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 56, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 44, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return 1; } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 59, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 47, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -174,36 +99,36 @@ async function F() { } async function G() { ->G : Symbol(G, Decl(promiseTypeStrictNull.ts, 62, 1)) +>G : Symbol(G, Decl(promiseTypeStrictNull.ts, 50, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 66, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 54, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 66, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 54, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 69, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 57, 11)) return; } } async function H() { ->H : Symbol(H, Decl(promiseTypeStrictNull.ts, 72, 1)) +>H : Symbol(H, Decl(promiseTypeStrictNull.ts, 60, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 76, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 64, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 76, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 64, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 79, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 67, 11)) throw Error(); >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -211,18 +136,18 @@ async function H() { } async function I() { ->I : Symbol(I, Decl(promiseTypeStrictNull.ts, 82, 1)) +>I : Symbol(I, Decl(promiseTypeStrictNull.ts, 70, 1)) try { const a = await p; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 86, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 74, 13)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) return a; ->a : Symbol(a, Decl(promiseTypeStrictNull.ts, 86, 13)) +>a : Symbol(a, Decl(promiseTypeStrictNull.ts, 74, 13)) } catch (e) { ->e : Symbol(e, Decl(promiseTypeStrictNull.ts, 89, 11)) +>e : Symbol(e, Decl(promiseTypeStrictNull.ts, 77, 11)) return Promise.reject(Error()); >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -235,390 +160,916 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); ->p00 : Symbol(p00, Decl(promiseTypeStrictNull.ts, 96, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>p00 : Symbol(p00, Decl(promiseTypeStrictNull.ts, 84, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) + +const p01 = p.then(); +>p01 : Symbol(p01, Decl(promiseTypeStrictNull.ts, 85, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p01 = p.catch(undefined); ->p01 : Symbol(p01, Decl(promiseTypeStrictNull.ts, 97, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p10 = p.catch(undefined); +>p10 : Symbol(p10, Decl(promiseTypeStrictNull.ts, 87, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p07 = p.catch(null); ->p07 : Symbol(p07, Decl(promiseTypeStrictNull.ts, 98, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p11 = p.catch(null); +>p11 : Symbol(p11, Decl(promiseTypeStrictNull.ts, 88, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) -const p02 = p.catch(() => 1); ->p02 : Symbol(p02, Decl(promiseTypeStrictNull.ts, 99, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p12 = p.catch(() => 1); +>p12 : Symbol(p12, Decl(promiseTypeStrictNull.ts, 89, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) -const p03 = p.catch(() => {}); ->p03 : Symbol(p03, Decl(promiseTypeStrictNull.ts, 100, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p13 = p.catch(() => x); +>p13 : Symbol(p13, Decl(promiseTypeStrictNull.ts, 90, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p04 = p.catch(() => {throw 1}); ->p04 : Symbol(p04, Decl(promiseTypeStrictNull.ts, 101, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p14 = p.catch(() => undefined); +>p14 : Symbol(p14, Decl(promiseTypeStrictNull.ts, 91, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p15 = p.catch(() => null); +>p15 : Symbol(p15, Decl(promiseTypeStrictNull.ts, 92, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) + +const p16 = p.catch(() => {}); +>p16 : Symbol(p16, Decl(promiseTypeStrictNull.ts, 93, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) + +const p17 = p.catch(() => {throw 1}); +>p17 : Symbol(p17, Decl(promiseTypeStrictNull.ts, 94, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Symbol(p05, Decl(promiseTypeStrictNull.ts, 102, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Symbol(p18, Decl(promiseTypeStrictNull.ts, 95, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Symbol(p06, Decl(promiseTypeStrictNull.ts, 103, 5)) ->p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Symbol(p19, Decl(promiseTypeStrictNull.ts, 96, 5)) +>p.catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>catch : Symbol(Promise.catch, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p10 = p.then(); ->p10 : Symbol(p10, Decl(promiseTypeStrictNull.ts, 105, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p20 = p.then(undefined); +>p20 : Symbol(p20, Decl(promiseTypeStrictNull.ts, 98, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p20 = p.then(undefined); ->p20 : Symbol(p20, Decl(promiseTypeStrictNull.ts, 107, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p21 = p.then(null); +>p21 : Symbol(p21, Decl(promiseTypeStrictNull.ts, 99, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p22 = p.then(() => 1); +>p22 : Symbol(p22, Decl(promiseTypeStrictNull.ts, 100, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p23 = p.then(() => x); +>p23 : Symbol(p23, Decl(promiseTypeStrictNull.ts, 101, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p24 = p.then(() => undefined); +>p24 : Symbol(p24, Decl(promiseTypeStrictNull.ts, 102, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p21 = p.then(() => 1); ->p21 : Symbol(p21, Decl(promiseTypeStrictNull.ts, 108, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p25 = p.then(() => null); +>p25 : Symbol(p25, Decl(promiseTypeStrictNull.ts, 103, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p22 = p.then(() => {}); ->p22 : Symbol(p22, Decl(promiseTypeStrictNull.ts, 109, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p26 = p.then(() => {}); +>p26 : Symbol(p26, Decl(promiseTypeStrictNull.ts, 104, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p23 = p.then(() => {throw 1}); ->p23 : Symbol(p23, Decl(promiseTypeStrictNull.ts, 110, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p27 = p.then(() => {throw 1}); +>p27 : Symbol(p27, Decl(promiseTypeStrictNull.ts, 105, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Symbol(p24, Decl(promiseTypeStrictNull.ts, 111, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Symbol(p28, Decl(promiseTypeStrictNull.ts, 106, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p25 = p.then(() => Promise.reject(1)); ->p25 : Symbol(p25, Decl(promiseTypeStrictNull.ts, 112, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p29 = p.then(() => Promise.reject(1)); +>p29 : Symbol(p29, Decl(promiseTypeStrictNull.ts, 107, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) const p30 = p.then(undefined, undefined); ->p30 : Symbol(p30, Decl(promiseTypeStrictNull.ts, 114, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>p30 : Symbol(p30, Decl(promiseTypeStrictNull.ts, 109, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p31 = p.then(undefined, null); +>p31 : Symbol(p31, Decl(promiseTypeStrictNull.ts, 110, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p32 = p.then(undefined, () => 1); +>p32 : Symbol(p32, Decl(promiseTypeStrictNull.ts, 111, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p33 = p.then(undefined, () => x); +>p33 : Symbol(p33, Decl(promiseTypeStrictNull.ts, 112, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p34 = p.then(undefined, () => undefined); +>p34 : Symbol(p34, Decl(promiseTypeStrictNull.ts, 113, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p35 = p.then(undefined, () => null); +>p35 : Symbol(p35, Decl(promiseTypeStrictNull.ts, 114, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p36 = p.then(undefined, () => {}); +>p36 : Symbol(p36, Decl(promiseTypeStrictNull.ts, 115, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Symbol(p37, Decl(promiseTypeStrictNull.ts, 116, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Symbol(p38, Decl(promiseTypeStrictNull.ts, 117, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Symbol(p39, Decl(promiseTypeStrictNull.ts, 118, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p40 = p.then(null, undefined); +>p40 : Symbol(p40, Decl(promiseTypeStrictNull.ts, 120, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p41 = p.then(null, null); +>p41 : Symbol(p41, Decl(promiseTypeStrictNull.ts, 121, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p42 = p.then(null, () => 1); +>p42 : Symbol(p42, Decl(promiseTypeStrictNull.ts, 122, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p43 = p.then(null, () => x); +>p43 : Symbol(p43, Decl(promiseTypeStrictNull.ts, 123, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p44 = p.then(null, () => undefined); +>p44 : Symbol(p44, Decl(promiseTypeStrictNull.ts, 124, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p45 = p.then(null, () => null); +>p45 : Symbol(p45, Decl(promiseTypeStrictNull.ts, 125, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p46 = p.then(null, () => {}); +>p46 : Symbol(p46, Decl(promiseTypeStrictNull.ts, 126, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p47 = p.then(null, () => {throw 1}); +>p47 : Symbol(p47, Decl(promiseTypeStrictNull.ts, 127, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Symbol(p48, Decl(promiseTypeStrictNull.ts, 128, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Symbol(p49, Decl(promiseTypeStrictNull.ts, 129, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p50 = p.then(() => "1", undefined); +>p50 : Symbol(p50, Decl(promiseTypeStrictNull.ts, 131, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p51 = p.then(() => "1", null); +>p51 : Symbol(p51, Decl(promiseTypeStrictNull.ts, 132, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p52 = p.then(() => "1", () => 1); +>p52 : Symbol(p52, Decl(promiseTypeStrictNull.ts, 133, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p53 = p.then(() => "1", () => x); +>p53 : Symbol(p53, Decl(promiseTypeStrictNull.ts, 134, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p54 = p.then(() => "1", () => undefined); +>p54 : Symbol(p54, Decl(promiseTypeStrictNull.ts, 135, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p55 = p.then(() => "1", () => null); +>p55 : Symbol(p55, Decl(promiseTypeStrictNull.ts, 136, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p56 = p.then(() => "1", () => {}); +>p56 : Symbol(p56, Decl(promiseTypeStrictNull.ts, 137, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Symbol(p57, Decl(promiseTypeStrictNull.ts, 138, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Symbol(p58, Decl(promiseTypeStrictNull.ts, 139, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Symbol(p59, Decl(promiseTypeStrictNull.ts, 140, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p60 = p.then(() => x, undefined); +>p60 : Symbol(p60, Decl(promiseTypeStrictNull.ts, 142, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p61 = p.then(() => x, null); +>p61 : Symbol(p61, Decl(promiseTypeStrictNull.ts, 143, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p62 = p.then(() => x, () => 1); +>p62 : Symbol(p62, Decl(promiseTypeStrictNull.ts, 144, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p63 = p.then(() => x, () => x); +>p63 : Symbol(p63, Decl(promiseTypeStrictNull.ts, 145, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p64 = p.then(() => x, () => undefined); +>p64 : Symbol(p64, Decl(promiseTypeStrictNull.ts, 146, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>undefined : Symbol(undefined) + +const p65 = p.then(() => x, () => null); +>p65 : Symbol(p65, Decl(promiseTypeStrictNull.ts, 147, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p66 = p.then(() => x, () => {}); +>p66 : Symbol(p66, Decl(promiseTypeStrictNull.ts, 148, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Symbol(p67, Decl(promiseTypeStrictNull.ts, 149, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Symbol(p68, Decl(promiseTypeStrictNull.ts, 150, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Symbol(p69, Decl(promiseTypeStrictNull.ts, 151, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const p70 = p.then(() => undefined, undefined); +>p70 : Symbol(p70, Decl(promiseTypeStrictNull.ts, 153, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) >undefined : Symbol(undefined) -const p31 = p.then(undefined, () => 1); ->p31 : Symbol(p31, Decl(promiseTypeStrictNull.ts, 115, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p71 = p.then(() => undefined, null); +>p71 : Symbol(p71, Decl(promiseTypeStrictNull.ts, 154, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p32 = p.then(undefined, () => {}); ->p32 : Symbol(p32, Decl(promiseTypeStrictNull.ts, 116, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p72 = p.then(() => undefined, () => 1); +>p72 : Symbol(p72, Decl(promiseTypeStrictNull.ts, 155, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Symbol(p33, Decl(promiseTypeStrictNull.ts, 117, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p73 = p.then(() => undefined, () => x); +>p73 : Symbol(p73, Decl(promiseTypeStrictNull.ts, 156, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Symbol(p34, Decl(promiseTypeStrictNull.ts, 118, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p74 = p.then(() => undefined, () => undefined); +>p74 : Symbol(p74, Decl(promiseTypeStrictNull.ts, 157, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) +>undefined : Symbol(undefined) + +const p75 = p.then(() => undefined, () => null); +>p75 : Symbol(p75, Decl(promiseTypeStrictNull.ts, 158, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p76 = p.then(() => undefined, () => {}); +>p76 : Symbol(p76, Decl(promiseTypeStrictNull.ts, 159, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Symbol(p77, Decl(promiseTypeStrictNull.ts, 160, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Symbol(p78, Decl(promiseTypeStrictNull.ts, 161, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Symbol(p35, Decl(promiseTypeStrictNull.ts, 119, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Symbol(p79, Decl(promiseTypeStrictNull.ts, 162, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p40 = p.then(() => "1", undefined); ->p40 : Symbol(p40, Decl(promiseTypeStrictNull.ts, 121, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p80 = p.then(() => null, undefined); +>p80 : Symbol(p80, Decl(promiseTypeStrictNull.ts, 164, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p41 = p.then(() => "1", () => 1); ->p41 : Symbol(p41, Decl(promiseTypeStrictNull.ts, 122, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p81 = p.then(() => null, null); +>p81 : Symbol(p81, Decl(promiseTypeStrictNull.ts, 165, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p42 = p.then(() => "1", () => {}); ->p42 : Symbol(p42, Decl(promiseTypeStrictNull.ts, 123, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p82 = p.then(() => null, () => 1); +>p82 : Symbol(p82, Decl(promiseTypeStrictNull.ts, 166, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Symbol(p43, Decl(promiseTypeStrictNull.ts, 124, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p83 = p.then(() => null, () => x); +>p83 : Symbol(p83, Decl(promiseTypeStrictNull.ts, 167, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Symbol(p44, Decl(promiseTypeStrictNull.ts, 125, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p84 = p.then(() => null, () => undefined); +>p84 : Symbol(p84, Decl(promiseTypeStrictNull.ts, 168, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p85 = p.then(() => null, () => null); +>p85 : Symbol(p85, Decl(promiseTypeStrictNull.ts, 169, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p86 = p.then(() => null, () => {}); +>p86 : Symbol(p86, Decl(promiseTypeStrictNull.ts, 170, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Symbol(p87, Decl(promiseTypeStrictNull.ts, 171, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Symbol(p88, Decl(promiseTypeStrictNull.ts, 172, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Symbol(p45, Decl(promiseTypeStrictNull.ts, 126, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Symbol(p89, Decl(promiseTypeStrictNull.ts, 173, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p50 = p.then(() => {}, undefined); ->p50 : Symbol(p50, Decl(promiseTypeStrictNull.ts, 128, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p90 = p.then(() => {}, undefined); +>p90 : Symbol(p90, Decl(promiseTypeStrictNull.ts, 175, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p51 = p.then(() => {}, () => 1); ->p51 : Symbol(p51, Decl(promiseTypeStrictNull.ts, 129, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p91 = p.then(() => {}, null); +>p91 : Symbol(p91, Decl(promiseTypeStrictNull.ts, 176, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p52 = p.then(() => {}, () => {}); ->p52 : Symbol(p52, Decl(promiseTypeStrictNull.ts, 130, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p92 = p.then(() => {}, () => 1); +>p92 : Symbol(p92, Decl(promiseTypeStrictNull.ts, 177, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Symbol(p53, Decl(promiseTypeStrictNull.ts, 131, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p93 = p.then(() => {}, () => x); +>p93 : Symbol(p93, Decl(promiseTypeStrictNull.ts, 178, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Symbol(p54, Decl(promiseTypeStrictNull.ts, 132, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p94 = p.then(() => {}, () => undefined); +>p94 : Symbol(p94, Decl(promiseTypeStrictNull.ts, 179, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const p95 = p.then(() => {}, () => null); +>p95 : Symbol(p95, Decl(promiseTypeStrictNull.ts, 180, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p96 = p.then(() => {}, () => {}); +>p96 : Symbol(p96, Decl(promiseTypeStrictNull.ts, 181, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Symbol(p97, Decl(promiseTypeStrictNull.ts, 182, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Symbol(p98, Decl(promiseTypeStrictNull.ts, 183, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Symbol(p55, Decl(promiseTypeStrictNull.ts, 133, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Symbol(p99, Decl(promiseTypeStrictNull.ts, 184, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Symbol(p60, Decl(promiseTypeStrictNull.ts, 135, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Symbol(pa0, Decl(promiseTypeStrictNull.ts, 186, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Symbol(p61, Decl(promiseTypeStrictNull.ts, 136, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Symbol(pa1, Decl(promiseTypeStrictNull.ts, 187, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Symbol(pa2, Decl(promiseTypeStrictNull.ts, 188, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Symbol(p62, Decl(promiseTypeStrictNull.ts, 137, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Symbol(pa3, Decl(promiseTypeStrictNull.ts, 189, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Symbol(p63, Decl(promiseTypeStrictNull.ts, 138, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Symbol(pa4, Decl(promiseTypeStrictNull.ts, 190, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Symbol(p64, Decl(promiseTypeStrictNull.ts, 139, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Symbol(pa5, Decl(promiseTypeStrictNull.ts, 191, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Symbol(pa6, Decl(promiseTypeStrictNull.ts, 192, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Symbol(pa7, Decl(promiseTypeStrictNull.ts, 193, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) + +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Symbol(pa8, Decl(promiseTypeStrictNull.ts, 194, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Symbol(p65, Decl(promiseTypeStrictNull.ts, 140, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Symbol(pa9, Decl(promiseTypeStrictNull.ts, 195, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Symbol(p70, Decl(promiseTypeStrictNull.ts, 142, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Symbol(pb0, Decl(promiseTypeStrictNull.ts, 197, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Symbol(p71, Decl(promiseTypeStrictNull.ts, 143, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Symbol(pb1, Decl(promiseTypeStrictNull.ts, 198, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Symbol(pb2, Decl(promiseTypeStrictNull.ts, 199, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Symbol(p72, Decl(promiseTypeStrictNull.ts, 144, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Symbol(pb3, Decl(promiseTypeStrictNull.ts, 200, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Symbol(p73, Decl(promiseTypeStrictNull.ts, 145, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Symbol(pb4, Decl(promiseTypeStrictNull.ts, 201, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Symbol(p74, Decl(promiseTypeStrictNull.ts, 146, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Symbol(pb5, Decl(promiseTypeStrictNull.ts, 202, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Symbol(pb6, Decl(promiseTypeStrictNull.ts, 203, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Symbol(p75, Decl(promiseTypeStrictNull.ts, 147, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Symbol(pb7, Decl(promiseTypeStrictNull.ts, 204, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Symbol(pb8, Decl(promiseTypeStrictNull.ts, 205, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Symbol(pb9, Decl(promiseTypeStrictNull.ts, 206, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Symbol(pc0, Decl(promiseTypeStrictNull.ts, 208, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>undefined : Symbol(undefined) + +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Symbol(pc1, Decl(promiseTypeStrictNull.ts, 209, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Symbol(pc2, Decl(promiseTypeStrictNull.ts, 210, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Symbol(pc3, Decl(promiseTypeStrictNull.ts, 211, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>x : Symbol(x, Decl(promiseTypeStrictNull.ts, 1, 11)) -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Symbol(p80, Decl(promiseTypeStrictNull.ts, 149, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Symbol(pc4, Decl(promiseTypeStrictNull.ts, 212, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >undefined : Symbol(undefined) -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Symbol(p81, Decl(promiseTypeStrictNull.ts, 150, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Symbol(pc5, Decl(promiseTypeStrictNull.ts, 213, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Symbol(p82, Decl(promiseTypeStrictNull.ts, 151, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Symbol(pc6, Decl(promiseTypeStrictNull.ts, 214, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Symbol(p83, Decl(promiseTypeStrictNull.ts, 152, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Symbol(pc7, Decl(promiseTypeStrictNull.ts, 215, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Symbol(p84, Decl(promiseTypeStrictNull.ts, 153, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Symbol(pc8, Decl(promiseTypeStrictNull.ts, 216, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) @@ -626,11 +1077,11 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Symbol(p85, Decl(promiseTypeStrictNull.ts, 154, 5)) ->p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Symbol(pc9, Decl(promiseTypeStrictNull.ts, 217, 5)) +>p.then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >p : Symbol(p, Decl(promiseTypeStrictNull.ts, 0, 11)) ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >Promise.reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >reject : Symbol(PromiseConstructor.reject, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) diff --git a/tests/baselines/reference/promiseTypeStrictNull.types b/tests/baselines/reference/promiseTypeStrictNull.types index a65547ec5f3ae..7bb75ec66f234 100644 --- a/tests/baselines/reference/promiseTypeStrictNull.types +++ b/tests/baselines/reference/promiseTypeStrictNull.types @@ -3,124 +3,8 @@ declare var p: Promise; >p : Promise >Promise : Promise -const a = p.then(); ->a : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - -const b = p.then(b => 1); ->b : Promise<1> ->p.then(b => 1) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 - -const c = p.then(b => 1, e => 'error'); ->c : Promise ->p.then(b => 1, e => 'error') : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => 'error' : (e: any) => string ->e : any ->'error' : "error" - -const d = p.then(b => 1, e => { }); ->d : Promise ->p.then(b => 1, e => { }) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { } : (e: any) => void ->e : any - -const e = p.then(b => 1, e => { throw Error(); }); ->e : Promise<1> ->p.then(b => 1, e => { throw Error(); }) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const f = p.then(b => 1, e => Promise.reject(Error())); ->f : Promise<1> ->p.then(b => 1, e => Promise.reject(Error())) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->b => 1 : (b: boolean) => 1 ->b : boolean ->1 : 1 ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor - -const g = p.catch(e => 'error'); ->g : Promise ->p.catch(e => 'error') : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => 'error' : (e: any) => "error" ->e : any ->'error' : "error" - -const h = p.catch(e => { }); ->h : Promise ->p.catch(e => { }) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { } : (e: any) => void ->e : any - -const i = p.catch(e => { throw Error(); }); ->i : Promise ->p.catch(e => { throw Error(); }) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => { throw Error(); } : (e: any) => never ->e : any ->Error() : Error ->Error : ErrorConstructor - -const j = p.catch(e => Promise.reject(Error())); ->j : Promise ->p.catch(e => Promise.reject(Error())) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->e => Promise.reject(Error()) : (e: any) => Promise ->e : any ->Promise.reject(Error()) : Promise ->Promise.reject : { (reason: any): Promise; (reason: any): Promise; } ->Promise : PromiseConstructor ->reject : { (reason: any): Promise; (reason: any): Promise; } ->Error() : Error ->Error : ErrorConstructor +declare var x: any; +>x : any async function A() { >A : () => Promise @@ -146,17 +30,25 @@ async function B() { >1 : 1 } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { +>C : () => Promise<1 | "error"> + + try { + const a = await p; +>a : boolean +>await p : boolean +>p : Promise + + return 1; +>1 : 1 + } + catch (e) { +>e : any + + return 'error'; +>'error' : "error" + } +} async function D() { >D : () => Promise<1 | undefined> @@ -291,58 +183,92 @@ async function I() { const p00 = p.catch(); >p00 : Promise >p.catch() : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise -const p01 = p.catch(undefined); +const p01 = p.then(); >p01 : Promise +>p.then() : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise + +const p10 = p.catch(undefined); +>p10 : Promise >p.catch(undefined) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >undefined : undefined -const p07 = p.catch(null); ->p07 : Promise +const p11 = p.catch(null); +>p11 : Promise >p.catch(null) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >null : null -const p02 = p.catch(() => 1); ->p02 : Promise ->p.catch(() => 1) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +const p12 = p.catch(() => 1); +>p12 : Promise +>p.catch(() => 1) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } ->() => 1 : () => 1 +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => 1 : () => number >1 : 1 -const p03 = p.catch(() => {}); ->p03 : Promise +const p13 = p.catch(() => x); +>p13 : Promise +>p.catch(() => x) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>p : Promise +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any + +const p14 = p.catch(() => undefined); +>p14 : Promise +>p.catch(() => undefined) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>p : Promise +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined + +const p15 = p.catch(() => null); +>p15 : Promise +>p.catch(() => null) : Promise +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>p : Promise +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null + +const p16 = p.catch(() => {}); +>p16 : Promise >p.catch(() => {}) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => {} : () => void -const p04 = p.catch(() => {throw 1}); ->p04 : Promise +const p17 = p.catch(() => {throw 1}); +>p17 : Promise >p.catch(() => {throw 1}) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 -const p05 = p.catch(() => Promise.reject(1)); ->p05 : Promise +const p18 = p.catch(() => Promise.reject(1)); +>p18 : Promise >p.catch(() => Promise.reject(1)) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -350,12 +276,12 @@ const p05 = p.catch(() => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p06 = p.catch(() => Promise.resolve(1)); ->p06 : Promise +const p19 = p.catch(() => Promise.resolve(1)); +>p19 : Promise >p.catch(() => Promise.resolve(1)) : Promise ->p.catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>p.catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >p : Promise ->catch : { (onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onrejected: (reason: any) => TResult | PromiseLike): Promise; } +>catch : (onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -363,53 +289,81 @@ const p06 = p.catch(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p10 = p.then(); ->p10 : Promise ->p.then() : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } - const p20 = p.then(undefined); >p20 : Promise >p.then(undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined -const p21 = p.then(() => 1); ->p21 : Promise<1> ->p.then(() => 1) : Promise<1> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p21 = p.then(null); +>p21 : Promise +>p.then(null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null + +const p22 = p.then(() => 1); +>p22 : Promise +>p.then(() => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => 1 : () => 1 +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => 1 : () => number >1 : 1 -const p22 = p.then(() => {}); ->p22 : Promise +const p23 = p.then(() => x); +>p23 : Promise +>p.then(() => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any + +const p24 = p.then(() => undefined); +>p24 : Promise +>p.then(() => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined + +const p25 = p.then(() => null); +>p25 : Promise +>p.then(() => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null + +const p26 = p.then(() => {}); +>p26 : Promise >p.then(() => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void -const p23 = p.then(() => {throw 1}); ->p23 : Promise ->p.then(() => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p27 = p.then(() => {throw 1}); +>p27 : Promise +>p.then(() => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 -const p24 = p.then(() => Promise.resolve(1)); ->p24 : Promise +const p28 = p.then(() => Promise.resolve(1)); +>p28 : Promise >p.then(() => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -417,12 +371,12 @@ const p24 = p.then(() => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p25 = p.then(() => Promise.reject(1)); ->p25 : Promise ->p.then(() => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p29 = p.then(() => Promise.reject(1)); +>p29 : Promise +>p.then(() => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } @@ -433,47 +387,86 @@ const p25 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); >p30 : Promise >p.then(undefined, undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >undefined : undefined -const p31 = p.then(undefined, () => 1); ->p31 : Promise ->p.then(undefined, () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p31 = p.then(undefined, null); +>p31 : Promise +>p.then(undefined, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined ->() => 1 : () => 1 +>null : null + +const p32 = p.then(undefined, () => 1); +>p32 : Promise +>p.then(undefined, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => 1 : () => number >1 : 1 -const p32 = p.then(undefined, () => {}); ->p32 : Promise +const p33 = p.then(undefined, () => x); +>p33 : Promise +>p.then(undefined, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => x : () => any +>x : any + +const p34 = p.then(undefined, () => undefined); +>p34 : Promise +>p.then(undefined, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => undefined : () => undefined +>undefined : undefined + +const p35 = p.then(undefined, () => null); +>p35 : Promise +>p.then(undefined, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>undefined : undefined +>() => null : () => null +>null : null + +const p36 = p.then(undefined, () => {}); +>p36 : Promise >p.then(undefined, () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => {} : () => void -const p33 = p.then(undefined, () => {throw 1}); ->p33 : Promise +const p37 = p.then(undefined, () => {throw 1}); +>p37 : Promise >p.then(undefined, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => {throw 1} : () => never >1 : 1 -const p34 = p.then(undefined, () => Promise.resolve(1)); ->p34 : Promise +const p38 = p.then(undefined, () => Promise.resolve(1)); +>p38 : Promise >p.then(undefined, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -482,12 +475,12 @@ const p34 = p.then(undefined, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p35 = p.then(undefined, () => Promise.reject(1)); ->p35 : Promise +const p39 = p.then(undefined, () => Promise.reject(1)); +>p39 : Promise >p.then(undefined, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >undefined : undefined >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -496,55 +489,203 @@ const p35 = p.then(undefined, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p40 = p.then(() => "1", undefined); ->p40 : Promise<"1"> ->p.then(() => "1", undefined) : Promise<"1"> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p40 = p.then(null, undefined); +>p40 : Promise +>p.then(null, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>undefined : undefined + +const p41 = p.then(null, null); +>p41 : Promise +>p.then(null, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>null : null + +const p42 = p.then(null, () => 1); +>p42 : Promise +>p.then(null, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => 1 : () => number +>1 : 1 + +const p43 = p.then(null, () => x); +>p43 : Promise +>p.then(null, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => x : () => any +>x : any + +const p44 = p.then(null, () => undefined); +>p44 : Promise +>p.then(null, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => undefined : () => undefined +>undefined : undefined + +const p45 = p.then(null, () => null); +>p45 : Promise +>p.then(null, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => null : () => null +>null : null + +const p46 = p.then(null, () => {}); +>p46 : Promise +>p.then(null, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => {} : () => void + +const p47 = p.then(null, () => {throw 1}); +>p47 : Promise +>p.then(null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p48 = p.then(null, () => Promise.resolve(1)); +>p48 : Promise +>p.then(null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p49 = p.then(null, () => Promise.reject(1)); +>p49 : Promise +>p.then(null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p50 = p.then(() => "1", undefined); +>p50 : Promise +>p.then(() => "1", undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >undefined : undefined -const p41 = p.then(() => "1", () => 1); ->p41 : Promise ->p.then(() => "1", () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p51 = p.then(() => "1", null); +>p51 : Promise +>p.then(() => "1", null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>null : null + +const p52 = p.then(() => "1", () => 1); +>p52 : Promise +>p.then(() => "1", () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => 1 : () => number >1 : 1 -const p42 = p.then(() => "1", () => {}); ->p42 : Promise ->p.then(() => "1", () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p53 = p.then(() => "1", () => x); +>p53 : Promise +>p.then(() => "1", () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>() => x : () => any +>x : any + +const p54 = p.then(() => "1", () => undefined); +>p54 : Promise +>p.then(() => "1", () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>() => undefined : () => undefined +>undefined : undefined + +const p55 = p.then(() => "1", () => null); +>p55 : Promise +>p.then(() => "1", () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string +>"1" : "1" +>() => null : () => null +>null : null + +const p56 = p.then(() => "1", () => {}); +>p56 : Promise +>p.then(() => "1", () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => {} : () => void -const p43 = p.then(() => "1", () => {throw 1}); ->p43 : Promise<"1"> ->p.then(() => "1", () => {throw 1}) : Promise<"1"> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p57 = p.then(() => "1", () => {throw 1}); +>p57 : Promise +>p.then(() => "1", () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p44 = p.then(() => "1", () => Promise.resolve(1)); ->p44 : Promise ->p.then(() => "1", () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p58 = p.then(() => "1", () => Promise.resolve(1)); +>p58 : Promise +>p.then(() => "1", () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -553,13 +694,13 @@ const p44 = p.then(() => "1", () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p45 = p.then(() => "1", () => Promise.reject(1)); ->p45 : Promise<"1"> ->p.then(() => "1", () => Promise.reject(1)) : Promise<"1"> ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const p59 = p.then(() => "1", () => Promise.reject(1)); +>p59 : Promise +>p.then(() => "1", () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => "1" : () => "1" +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => "1" : () => string >"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -568,50 +709,434 @@ const p45 = p.then(() => "1", () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p50 = p.then(() => {}, undefined); ->p50 : Promise +const p60 = p.then(() => x, undefined); +>p60 : Promise +>p.then(() => x, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>undefined : undefined + +const p61 = p.then(() => x, null); +>p61 : Promise +>p.then(() => x, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>null : null + +const p62 = p.then(() => x, () => 1); +>p62 : Promise +>p.then(() => x, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => 1 : () => number +>1 : 1 + +const p63 = p.then(() => x, () => x); +>p63 : Promise +>p.then(() => x, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => x : () => any +>x : any + +const p64 = p.then(() => x, () => undefined); +>p64 : Promise +>p.then(() => x, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => undefined : () => undefined +>undefined : undefined + +const p65 = p.then(() => x, () => null); +>p65 : Promise +>p.then(() => x, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => null : () => null +>null : null + +const p66 = p.then(() => x, () => {}); +>p66 : Promise +>p.then(() => x, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => {} : () => void + +const p67 = p.then(() => x, () => {throw 1}); +>p67 : Promise +>p.then(() => x, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => {throw 1} : () => never +>1 : 1 + +const p68 = p.then(() => x, () => Promise.resolve(1)); +>p68 : Promise +>p.then(() => x, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p69 = p.then(() => x, () => Promise.reject(1)); +>p69 : Promise +>p.then(() => x, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => x : () => any +>x : any +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p70 = p.then(() => undefined, undefined); +>p70 : Promise +>p.then(() => undefined, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>undefined : undefined + +const p71 = p.then(() => undefined, null); +>p71 : Promise +>p.then(() => undefined, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>null : null + +const p72 = p.then(() => undefined, () => 1); +>p72 : Promise +>p.then(() => undefined, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => 1 : () => number +>1 : 1 + +const p73 = p.then(() => undefined, () => x); +>p73 : Promise +>p.then(() => undefined, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => x : () => any +>x : any + +const p74 = p.then(() => undefined, () => undefined); +>p74 : Promise +>p.then(() => undefined, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => undefined : () => undefined +>undefined : undefined + +const p75 = p.then(() => undefined, () => null); +>p75 : Promise +>p.then(() => undefined, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => null : () => null +>null : null + +const p76 = p.then(() => undefined, () => {}); +>p76 : Promise +>p.then(() => undefined, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => {} : () => void + +const p77 = p.then(() => undefined, () => {throw 1}); +>p77 : Promise +>p.then(() => undefined, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => {throw 1} : () => never +>1 : 1 + +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +>p78 : Promise +>p.then(() => undefined, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p79 = p.then(() => undefined, () => Promise.reject(1)); +>p79 : Promise +>p.then(() => undefined, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => undefined : () => undefined +>undefined : undefined +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p80 = p.then(() => null, undefined); +>p80 : Promise +>p.then(() => null, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>undefined : undefined + +const p81 = p.then(() => null, null); +>p81 : Promise +>p.then(() => null, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>null : null + +const p82 = p.then(() => null, () => 1); +>p82 : Promise +>p.then(() => null, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => 1 : () => number +>1 : 1 + +const p83 = p.then(() => null, () => x); +>p83 : Promise +>p.then(() => null, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => x : () => any +>x : any + +const p84 = p.then(() => null, () => undefined); +>p84 : Promise +>p.then(() => null, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => undefined : () => undefined +>undefined : undefined + +const p85 = p.then(() => null, () => null); +>p85 : Promise +>p.then(() => null, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => null : () => null +>null : null + +const p86 = p.then(() => null, () => {}); +>p86 : Promise +>p.then(() => null, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => {} : () => void + +const p87 = p.then(() => null, () => {throw 1}); +>p87 : Promise +>p.then(() => null, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => {throw 1} : () => never +>1 : 1 + +const p88 = p.then(() => null, () => Promise.resolve(1)); +>p88 : Promise +>p.then(() => null, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => Promise.resolve(1) : () => Promise +>Promise.resolve(1) : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>1 : 1 + +const p89 = p.then(() => null, () => Promise.reject(1)); +>p89 : Promise +>p.then(() => null, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => null : () => null +>null : null +>() => Promise.reject(1) : () => Promise +>Promise.reject(1) : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>1 : 1 + +const p90 = p.then(() => {}, undefined); +>p90 : Promise >p.then(() => {}, undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >undefined : undefined -const p51 = p.then(() => {}, () => 1); ->p51 : Promise +const p91 = p.then(() => {}, null); +>p91 : Promise +>p.then(() => {}, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>null : null + +const p92 = p.then(() => {}, () => 1); +>p92 : Promise >p.then(() => {}, () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => 1 : () => number >1 : 1 -const p52 = p.then(() => {}, () => {}); ->p52 : Promise +const p93 = p.then(() => {}, () => x); +>p93 : Promise +>p.then(() => {}, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>() => x : () => any +>x : any + +const p94 = p.then(() => {}, () => undefined); +>p94 : Promise +>p.then(() => {}, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>() => undefined : () => undefined +>undefined : undefined + +const p95 = p.then(() => {}, () => null); +>p95 : Promise +>p.then(() => {}, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {} : () => void +>() => null : () => null +>null : null + +const p96 = p.then(() => {}, () => {}); +>p96 : Promise >p.then(() => {}, () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => {} : () => void -const p53 = p.then(() => {}, () => {throw 1}); ->p53 : Promise +const p97 = p.then(() => {}, () => {throw 1}); +>p97 : Promise >p.then(() => {}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => {throw 1} : () => never >1 : 1 -const p54 = p.then(() => {}, () => Promise.resolve(1)); ->p54 : Promise +const p98 = p.then(() => {}, () => Promise.resolve(1)); +>p98 : Promise >p.then(() => {}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise @@ -620,12 +1145,12 @@ const p54 = p.then(() => {}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p55 = p.then(() => {}, () => Promise.reject(1)); ->p55 : Promise +const p99 = p.then(() => {}, () => Promise.reject(1)); +>p99 : Promise >p.then(() => {}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {} : () => void >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise @@ -634,54 +1159,97 @@ const p55 = p.then(() => {}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p60 = p.then(() => {throw 1}, undefined); ->p60 : Promise ->p.then(() => {throw 1}, undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa0 = p.then(() => {throw 1}, undefined); +>pa0 : Promise +>p.then(() => {throw 1}, undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >undefined : undefined -const p61 = p.then(() => {throw 1}, () => 1); ->p61 : Promise ->p.then(() => {throw 1}, () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa1 = p.then(() => {throw 1}, null); +>pa1 : Promise +>p.then(() => {throw 1}, null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never +>1 : 1 +>null : null + +const pa2 = p.then(() => {throw 1}, () => 1); +>pa2 : Promise +>p.then(() => {throw 1}, () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => 1 : () => number +>1 : 1 + +const pa3 = p.then(() => {throw 1}, () => x); +>pa3 : Promise +>p.then(() => {throw 1}, () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 ->() => 1 : () => 1 +>() => x : () => any +>x : any + +const pa4 = p.then(() => {throw 1}, () => undefined); +>pa4 : Promise +>p.then(() => {throw 1}, () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never +>1 : 1 +>() => undefined : () => undefined +>undefined : undefined + +const pa5 = p.then(() => {throw 1}, () => null); +>pa5 : Promise +>p.then(() => {throw 1}, () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => {throw 1} : () => never >1 : 1 +>() => null : () => null +>null : null -const p62 = p.then(() => {throw 1}, () => {}); ->p62 : Promise ->p.then(() => {throw 1}, () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa6 = p.then(() => {throw 1}, () => {}); +>pa6 : Promise +>p.then(() => {throw 1}, () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => {} : () => void -const p63 = p.then(() => {throw 1}, () => {throw 1}); ->p63 : Promise ->p.then(() => {throw 1}, () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +>pa7 : Promise +>p.then(() => {throw 1}, () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => {throw 1} : () => never >1 : 1 -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); ->p64 : Promise ->p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +>pa8 : Promise +>p.then(() => {throw 1}, () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.resolve(1) : () => Promise @@ -691,12 +1259,12 @@ const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); ->p65 : Promise ->p.then(() => {throw 1}, () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); +>pa9 : Promise +>p.then(() => {throw 1}, () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => {throw 1} : () => never >1 : 1 >() => Promise.reject(1) : () => Promise @@ -706,12 +1274,12 @@ const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p70 = p.then(() => Promise.resolve("1"), undefined); ->p70 : Promise +const pb0 = p.then(() => Promise.resolve("1"), undefined); +>pb0 : Promise >p.then(() => Promise.resolve("1"), undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -720,12 +1288,26 @@ const p70 = p.then(() => Promise.resolve("1"), undefined); >"1" : "1" >undefined : undefined -const p71 = p.then(() => Promise.resolve("1"), () => 1); ->p71 : Promise +const pb1 = p.then(() => Promise.resolve("1"), null); +>pb1 : Promise +>p.then(() => Promise.resolve("1"), null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>null : null + +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +>pb2 : Promise >p.then(() => Promise.resolve("1"), () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -735,12 +1317,57 @@ const p71 = p.then(() => Promise.resolve("1"), () => 1); >() => 1 : () => number >1 : 1 -const p72 = p.then(() => Promise.resolve("1"), () => {}); ->p72 : Promise +const pb3 = p.then(() => Promise.resolve("1"), () => x); +>pb3 : Promise +>p.then(() => Promise.resolve("1"), () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +>pb4 : Promise +>p.then(() => Promise.resolve("1"), () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => undefined : () => undefined +>undefined : undefined + +const pb5 = p.then(() => Promise.resolve("1"), () => null); +>pb5 : Promise +>p.then(() => Promise.resolve("1"), () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.resolve("1") : () => Promise +>Promise.resolve("1") : Promise +>Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise : PromiseConstructor +>resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>"1" : "1" +>() => null : () => null +>null : null + +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +>pb6 : Promise >p.then(() => Promise.resolve("1"), () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -749,12 +1376,12 @@ const p72 = p.then(() => Promise.resolve("1"), () => {}); >"1" : "1" >() => {} : () => void -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); ->p73 : Promise +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +>pb7 : Promise >p.then(() => Promise.resolve("1"), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -764,12 +1391,12 @@ const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); >() => {throw 1} : () => never >1 : 1 -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); ->p74 : Promise +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +>pb8 : Promise >p.then(() => Promise.resolve("1"), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -783,12 +1410,12 @@ const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); ->p75 : Promise +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); +>pb9 : Promise >p.then(() => Promise.resolve("1"), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >() => Promise.resolve("1") : () => Promise >Promise.resolve("1") : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -802,76 +1429,135 @@ const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); >reject : { (reason: any): Promise; (reason: any): Promise; } >1 : 1 -const p80 = p.then(() => Promise.reject(1), undefined); ->p80 : Promise ->p.then(() => Promise.reject(1), undefined) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc0 = p.then(() => Promise.reject("1"), undefined); +>pc0 : Promise +>p.then(() => Promise.reject("1"), undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >undefined : undefined -const p81 = p.then(() => Promise.reject(1), () => 1); ->p81 : Promise ->p.then(() => Promise.reject(1), () => 1) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc1 = p.then(() => Promise.reject("1"), null); +>pc1 : Promise +>p.then(() => Promise.reject("1"), null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 ->() => 1 : () => 1 ->1 : 1 +>"1" : "1" +>null : null -const p82 = p.then(() => Promise.reject(1), () => {}); ->p82 : Promise ->p.then(() => Promise.reject(1), () => {}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc2 = p.then(() => Promise.reject("1"), () => 1); +>pc2 : Promise +>p.then(() => Promise.reject("1"), () => 1) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => 1 : () => number >1 : 1 + +const pc3 = p.then(() => Promise.reject("1"), () => x); +>pc3 : Promise +>p.then(() => Promise.reject("1"), () => x) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => x : () => any +>x : any + +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +>pc4 : Promise +>p.then(() => Promise.reject("1"), () => undefined) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => undefined : () => undefined +>undefined : undefined + +const pc5 = p.then(() => Promise.reject("1"), () => null); +>pc5 : Promise +>p.then(() => Promise.reject("1"), () => null) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" +>() => null : () => null +>null : null + +const pc6 = p.then(() => Promise.reject("1"), () => {}); +>pc6 : Promise +>p.then(() => Promise.reject("1"), () => {}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>p : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise +>Promise.reject : { (reason: any): Promise; (reason: any): Promise; } +>Promise : PromiseConstructor +>reject : { (reason: any): Promise; (reason: any): Promise; } +>"1" : "1" >() => {} : () => void -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); ->p83 : Promise ->p.then(() => Promise.reject(1), () => {throw 1}) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +>pc7 : Promise +>p.then(() => Promise.reject("1"), () => {throw 1}) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => {throw 1} : () => never >1 : 1 -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); ->p84 : Promise ->p.then(() => Promise.reject(1), () => Promise.resolve(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +>pc8 : Promise +>p.then(() => Promise.reject("1"), () => Promise.resolve(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.resolve(1) : () => Promise >Promise.resolve(1) : Promise >Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } @@ -879,18 +1565,18 @@ const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); >resolve : { (value: T | PromiseLike): Promise; (): Promise; } >1 : 1 -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); ->p85 : Promise ->p.then(() => Promise.reject(1), () => Promise.reject(1)) : Promise ->p.then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); +>pc9 : Promise +>p.then(() => Promise.reject("1"), () => Promise.reject(1)) : Promise +>p.then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise >p : Promise ->then : { (onfulfilled?: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected?: ((reason: any) => boolean | PromiseLike) | null | undefined): Promise; (onfulfilled: ((value: boolean) => boolean | PromiseLike) | null | undefined, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: boolean) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | null | undefined): Promise; (onfulfilled: (value: boolean) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } ->() => Promise.reject(1) : () => Promise ->Promise.reject(1) : Promise +>then : (onfulfilled?: ((value: boolean) => TResult1 | PromiseLike) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null | undefined) => Promise +>() => Promise.reject("1") : () => Promise +>Promise.reject("1") : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } >Promise : PromiseConstructor >reject : { (reason: any): Promise; (reason: any): Promise; } ->1 : 1 +>"1" : "1" >() => Promise.reject(1) : () => Promise >Promise.reject(1) : Promise >Promise.reject : { (reason: any): Promise; (reason: any): Promise; } diff --git a/tests/baselines/reference/promiseVoidErrorCallback.symbols b/tests/baselines/reference/promiseVoidErrorCallback.symbols index 67747f5f1500d..e20cd11a0d6c5 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.symbols +++ b/tests/baselines/reference/promiseVoidErrorCallback.symbols @@ -47,12 +47,12 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Symbol(x3, Decl(promiseVoidErrorCallback.ts, 20, 3)) ->f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) ->f1() .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>f1() .then(f2, (e: Error) => { throw e;}) .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) +>f1() .then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >f1 : Symbol(f1, Decl(promiseVoidErrorCallback.ts, 10, 1)) .then(f2, (e: Error) => { ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >f2 : Symbol(f2, Decl(promiseVoidErrorCallback.ts, 14, 1)) >e : Symbol(e, Decl(promiseVoidErrorCallback.ts, 21, 15)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) @@ -62,7 +62,7 @@ var x3 = f1() }) .then((x: T2) => { ->then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>then : Symbol(Promise.then, Decl(lib.es2015.promise.d.ts, --, --)) >x : Symbol(x, Decl(promiseVoidErrorCallback.ts, 24, 11)) >T2 : Symbol(T2, Decl(promiseVoidErrorCallback.ts, 2, 1)) diff --git a/tests/baselines/reference/promiseVoidErrorCallback.types b/tests/baselines/reference/promiseVoidErrorCallback.types index 65c9fd0b6893c..bd1b3a87c2603 100644 --- a/tests/baselines/reference/promiseVoidErrorCallback.types +++ b/tests/baselines/reference/promiseVoidErrorCallback.types @@ -54,14 +54,14 @@ function f2(x: T1): T2 { var x3 = f1() >x3 : Promise<{ __t3: string; }> >f1() .then(f2, (e: Error) => { throw e;}) .then((x: T2) => { return { __t3: x.__t2 + "bar" };}) : Promise<{ __t3: string; }> ->f1() .then(f2, (e: Error) => { throw e;}) .then : { (onfulfilled?: (value: T2) => T2 | PromiseLike, onrejected?: (reason: any) => T2 | PromiseLike): Promise; (onfulfilled: (value: T2) => T2 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>f1() .then(f2, (e: Error) => { throw e;}) .then : (onfulfilled?: (value: T2) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >f1() .then(f2, (e: Error) => { throw e;}) : Promise ->f1() .then : { (onfulfilled?: (value: T1) => T1 | PromiseLike, onrejected?: (reason: any) => T1 | PromiseLike): Promise; (onfulfilled: (value: T1) => T1 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>f1() .then : (onfulfilled?: (value: T1) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >f1() : Promise >f1 : () => Promise .then(f2, (e: Error) => { ->then : { (onfulfilled?: (value: T1) => T1 | PromiseLike, onrejected?: (reason: any) => T1 | PromiseLike): Promise; (onfulfilled: (value: T1) => T1 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T1) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: T1) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >f2 : (x: T1) => T2 >(e: Error) => { throw e;} : (e: Error) => never >e : Error @@ -72,7 +72,7 @@ var x3 = f1() }) .then((x: T2) => { ->then : { (onfulfilled?: (value: T2) => T2 | PromiseLike, onrejected?: (reason: any) => T2 | PromiseLike): Promise; (onfulfilled: (value: T2) => T2 | PromiseLike, onrejected: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): Promise; (onfulfilled: (value: T2) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; } +>then : (onfulfilled?: (value: T2) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >(x: T2) => { return { __t3: x.__t2 + "bar" };} : (x: T2) => { __t3: string; } >x : T2 >T2 : T2 diff --git a/tests/cases/compiler/promiseType.ts b/tests/cases/compiler/promiseType.ts index b105485b2442e..ba4a7f6041396 100644 --- a/tests/cases/compiler/promiseType.ts +++ b/tests/cases/compiler/promiseType.ts @@ -1,16 +1,6 @@ // @target: es6 declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -22,17 +12,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -96,61 +84,136 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); - -const p10 = p.then(); +const p01 = p.then(); + +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); - -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); - -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); - -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); - -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); - -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); \ No newline at end of file +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); + +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); + +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); + +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); + +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); + +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1)); diff --git a/tests/cases/compiler/promiseTypeStrictNull.ts b/tests/cases/compiler/promiseTypeStrictNull.ts index ce6dcd364618f..fc0125412a43d 100644 --- a/tests/cases/compiler/promiseTypeStrictNull.ts +++ b/tests/cases/compiler/promiseTypeStrictNull.ts @@ -1,17 +1,7 @@ // @target: es6 // @strictNullChecks: true declare var p: Promise; - -const a = p.then(); -const b = p.then(b => 1); -const c = p.then(b => 1, e => 'error'); -const d = p.then(b => 1, e => { }); -const e = p.then(b => 1, e => { throw Error(); }); -const f = p.then(b => 1, e => Promise.reject(Error())); -const g = p.catch(e => 'error'); -const h = p.catch(e => { }); -const i = p.catch(e => { throw Error(); }); -const j = p.catch(e => Promise.reject(Error())); +declare var x: any; async function A() { const a = await p; @@ -23,17 +13,15 @@ async function B() { return 1; } -// NOTE: This reports a "No best comment type exists among return expressions." error, and is -// ignored to get the types result for the test. -// async function C() { -// try { -// const a = await p; -// return 1; -// } -// catch (e) { -// return 'error'; -// } -// } +async function C() { + try { + const a = await p; + return 1; + } + catch (e) { + return 'error'; + } +} async function D() { try { @@ -97,61 +85,136 @@ async function I() { // addresses github issue #4903: const p00 = p.catch(); -const p01 = p.catch(undefined); -const p07 = p.catch(null); -const p02 = p.catch(() => 1); -const p03 = p.catch(() => {}); -const p04 = p.catch(() => {throw 1}); -const p05 = p.catch(() => Promise.reject(1)); -const p06 = p.catch(() => Promise.resolve(1)); - -const p10 = p.then(); +const p01 = p.then(); + +const p10 = p.catch(undefined); +const p11 = p.catch(null); +const p12 = p.catch(() => 1); +const p13 = p.catch(() => x); +const p14 = p.catch(() => undefined); +const p15 = p.catch(() => null); +const p16 = p.catch(() => {}); +const p17 = p.catch(() => {throw 1}); +const p18 = p.catch(() => Promise.reject(1)); +const p19 = p.catch(() => Promise.resolve(1)); const p20 = p.then(undefined); -const p21 = p.then(() => 1); -const p22 = p.then(() => {}); -const p23 = p.then(() => {throw 1}); -const p24 = p.then(() => Promise.resolve(1)); -const p25 = p.then(() => Promise.reject(1)); +const p21 = p.then(null); +const p22 = p.then(() => 1); +const p23 = p.then(() => x); +const p24 = p.then(() => undefined); +const p25 = p.then(() => null); +const p26 = p.then(() => {}); +const p27 = p.then(() => {throw 1}); +const p28 = p.then(() => Promise.resolve(1)); +const p29 = p.then(() => Promise.reject(1)); const p30 = p.then(undefined, undefined); -const p31 = p.then(undefined, () => 1); -const p32 = p.then(undefined, () => {}); -const p33 = p.then(undefined, () => {throw 1}); -const p34 = p.then(undefined, () => Promise.resolve(1)); -const p35 = p.then(undefined, () => Promise.reject(1)); - -const p40 = p.then(() => "1", undefined); -const p41 = p.then(() => "1", () => 1); -const p42 = p.then(() => "1", () => {}); -const p43 = p.then(() => "1", () => {throw 1}); -const p44 = p.then(() => "1", () => Promise.resolve(1)); -const p45 = p.then(() => "1", () => Promise.reject(1)); - -const p50 = p.then(() => {}, undefined); -const p51 = p.then(() => {}, () => 1); -const p52 = p.then(() => {}, () => {}); -const p53 = p.then(() => {}, () => {throw 1}); -const p54 = p.then(() => {}, () => Promise.resolve(1)); -const p55 = p.then(() => {}, () => Promise.reject(1)); - -const p60 = p.then(() => {throw 1}, undefined); -const p61 = p.then(() => {throw 1}, () => 1); -const p62 = p.then(() => {throw 1}, () => {}); -const p63 = p.then(() => {throw 1}, () => {throw 1}); -const p64 = p.then(() => {throw 1}, () => Promise.resolve(1)); -const p65 = p.then(() => {throw 1}, () => Promise.reject(1)); - -const p70 = p.then(() => Promise.resolve("1"), undefined); -const p71 = p.then(() => Promise.resolve("1"), () => 1); -const p72 = p.then(() => Promise.resolve("1"), () => {}); -const p73 = p.then(() => Promise.resolve("1"), () => {throw 1}); -const p74 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); -const p75 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); - -const p80 = p.then(() => Promise.reject(1), undefined); -const p81 = p.then(() => Promise.reject(1), () => 1); -const p82 = p.then(() => Promise.reject(1), () => {}); -const p83 = p.then(() => Promise.reject(1), () => {throw 1}); -const p84 = p.then(() => Promise.reject(1), () => Promise.resolve(1)); -const p85 = p.then(() => Promise.reject(1), () => Promise.reject(1)); \ No newline at end of file +const p31 = p.then(undefined, null); +const p32 = p.then(undefined, () => 1); +const p33 = p.then(undefined, () => x); +const p34 = p.then(undefined, () => undefined); +const p35 = p.then(undefined, () => null); +const p36 = p.then(undefined, () => {}); +const p37 = p.then(undefined, () => {throw 1}); +const p38 = p.then(undefined, () => Promise.resolve(1)); +const p39 = p.then(undefined, () => Promise.reject(1)); + +const p40 = p.then(null, undefined); +const p41 = p.then(null, null); +const p42 = p.then(null, () => 1); +const p43 = p.then(null, () => x); +const p44 = p.then(null, () => undefined); +const p45 = p.then(null, () => null); +const p46 = p.then(null, () => {}); +const p47 = p.then(null, () => {throw 1}); +const p48 = p.then(null, () => Promise.resolve(1)); +const p49 = p.then(null, () => Promise.reject(1)); + +const p50 = p.then(() => "1", undefined); +const p51 = p.then(() => "1", null); +const p52 = p.then(() => "1", () => 1); +const p53 = p.then(() => "1", () => x); +const p54 = p.then(() => "1", () => undefined); +const p55 = p.then(() => "1", () => null); +const p56 = p.then(() => "1", () => {}); +const p57 = p.then(() => "1", () => {throw 1}); +const p58 = p.then(() => "1", () => Promise.resolve(1)); +const p59 = p.then(() => "1", () => Promise.reject(1)); + +const p60 = p.then(() => x, undefined); +const p61 = p.then(() => x, null); +const p62 = p.then(() => x, () => 1); +const p63 = p.then(() => x, () => x); +const p64 = p.then(() => x, () => undefined); +const p65 = p.then(() => x, () => null); +const p66 = p.then(() => x, () => {}); +const p67 = p.then(() => x, () => {throw 1}); +const p68 = p.then(() => x, () => Promise.resolve(1)); +const p69 = p.then(() => x, () => Promise.reject(1)); + +const p70 = p.then(() => undefined, undefined); +const p71 = p.then(() => undefined, null); +const p72 = p.then(() => undefined, () => 1); +const p73 = p.then(() => undefined, () => x); +const p74 = p.then(() => undefined, () => undefined); +const p75 = p.then(() => undefined, () => null); +const p76 = p.then(() => undefined, () => {}); +const p77 = p.then(() => undefined, () => {throw 1}); +const p78 = p.then(() => undefined, () => Promise.resolve(1)); +const p79 = p.then(() => undefined, () => Promise.reject(1)); + +const p80 = p.then(() => null, undefined); +const p81 = p.then(() => null, null); +const p82 = p.then(() => null, () => 1); +const p83 = p.then(() => null, () => x); +const p84 = p.then(() => null, () => undefined); +const p85 = p.then(() => null, () => null); +const p86 = p.then(() => null, () => {}); +const p87 = p.then(() => null, () => {throw 1}); +const p88 = p.then(() => null, () => Promise.resolve(1)); +const p89 = p.then(() => null, () => Promise.reject(1)); + +const p90 = p.then(() => {}, undefined); +const p91 = p.then(() => {}, null); +const p92 = p.then(() => {}, () => 1); +const p93 = p.then(() => {}, () => x); +const p94 = p.then(() => {}, () => undefined); +const p95 = p.then(() => {}, () => null); +const p96 = p.then(() => {}, () => {}); +const p97 = p.then(() => {}, () => {throw 1}); +const p98 = p.then(() => {}, () => Promise.resolve(1)); +const p99 = p.then(() => {}, () => Promise.reject(1)); + +const pa0 = p.then(() => {throw 1}, undefined); +const pa1 = p.then(() => {throw 1}, null); +const pa2 = p.then(() => {throw 1}, () => 1); +const pa3 = p.then(() => {throw 1}, () => x); +const pa4 = p.then(() => {throw 1}, () => undefined); +const pa5 = p.then(() => {throw 1}, () => null); +const pa6 = p.then(() => {throw 1}, () => {}); +const pa7 = p.then(() => {throw 1}, () => {throw 1}); +const pa8 = p.then(() => {throw 1}, () => Promise.resolve(1)); +const pa9 = p.then(() => {throw 1}, () => Promise.reject(1)); + +const pb0 = p.then(() => Promise.resolve("1"), undefined); +const pb1 = p.then(() => Promise.resolve("1"), null); +const pb2 = p.then(() => Promise.resolve("1"), () => 1); +const pb3 = p.then(() => Promise.resolve("1"), () => x); +const pb4 = p.then(() => Promise.resolve("1"), () => undefined); +const pb5 = p.then(() => Promise.resolve("1"), () => null); +const pb6 = p.then(() => Promise.resolve("1"), () => {}); +const pb7 = p.then(() => Promise.resolve("1"), () => {throw 1}); +const pb8 = p.then(() => Promise.resolve("1"), () => Promise.resolve(1)); +const pb9 = p.then(() => Promise.resolve("1"), () => Promise.reject(1)); + +const pc0 = p.then(() => Promise.reject("1"), undefined); +const pc1 = p.then(() => Promise.reject("1"), null); +const pc2 = p.then(() => Promise.reject("1"), () => 1); +const pc3 = p.then(() => Promise.reject("1"), () => x); +const pc4 = p.then(() => Promise.reject("1"), () => undefined); +const pc5 = p.then(() => Promise.reject("1"), () => null); +const pc6 = p.then(() => Promise.reject("1"), () => {}); +const pc7 = p.then(() => Promise.reject("1"), () => {throw 1}); +const pc8 = p.then(() => Promise.reject("1"), () => Promise.resolve(1)); +const pc9 = p.then(() => Promise.reject("1"), () => Promise.reject(1));