mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accepted baselines.
This commit is contained in:
@@ -6,7 +6,7 @@ tests/cases/compiler/assignmentCompatBug2.ts(5,13): error TS2322: Type '{ b: num
|
||||
Object literal may only specify known properties, and 'a' does not exist in type '{ b: number; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2741: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => null; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/assignmentCompatBug2.ts (6 errors) ====
|
||||
@@ -59,7 +59,7 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2741: Property 'm' i
|
||||
|
||||
b3 = {
|
||||
~~
|
||||
!!! error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! error TS2741: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => null; }' but required in type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
|
||||
!!! related TS2728 tests/cases/compiler/assignmentCompatBug2.ts:7:55: 'm' is declared here.
|
||||
f: (n) => { return 0; },
|
||||
g: (s) => { return 0; },
|
||||
|
||||
@@ -93,9 +93,9 @@ b3 = {
|
||||
}; // error
|
||||
|
||||
b3 = {
|
||||
>b3 = { f: (n) => { return 0; }, g: (s) => { return 0; }, m: 0, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; m: number; n: number; k: (a: any) => any; }
|
||||
>b3 = { f: (n) => { return 0; }, g: (s) => { return 0; }, m: 0, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; m: number; n: number; k: (a: any) => null; }
|
||||
>b3 : { f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }
|
||||
>{ f: (n) => { return 0; }, g: (s) => { return 0; }, m: 0, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; m: number; n: number; k: (a: any) => any; }
|
||||
>{ f: (n) => { return 0; }, g: (s) => { return 0; }, m: 0, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; m: number; n: number; k: (a: any) => null; }
|
||||
|
||||
f: (n) => { return 0; },
|
||||
>f : (n: number) => number
|
||||
@@ -118,17 +118,17 @@ b3 = {
|
||||
>0 : 0
|
||||
|
||||
k: (a) =>{ return null; },
|
||||
>k : (a: any) => any
|
||||
>(a) =>{ return null; } : (a: any) => any
|
||||
>k : (a: any) => null
|
||||
>(a) =>{ return null; } : (a: any) => null
|
||||
>a : any
|
||||
>null : null
|
||||
|
||||
}; // ok
|
||||
|
||||
b3 = {
|
||||
>b3 = { f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }
|
||||
>b3 = { f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => null; }
|
||||
>b3 : { f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }
|
||||
>{ f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }
|
||||
>{ f: (n) => { return 0; }, g: (s) => { return 0; }, n: 0, k: (a) =>{ return null; },} : { f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => null; }
|
||||
|
||||
f: (n) => { return 0; },
|
||||
>f : (n: number) => number
|
||||
@@ -147,8 +147,8 @@ b3 = {
|
||||
>0 : 0
|
||||
|
||||
k: (a) =>{ return null; },
|
||||
>k : (a: any) => any
|
||||
>(a) =>{ return null; } : (a: any) => any
|
||||
>k : (a: any) => null
|
||||
>(a) =>{ return null; } : (a: any) => null
|
||||
>a : any
|
||||
>null : null
|
||||
|
||||
|
||||
+64
-64
@@ -33,19 +33,19 @@ module ClassTypeParam {
|
||||
>() => { this.a = () => null; // ok, same T of required params this.a = (x?: T) => null; // ok, same T of required params this.a = (x: T) => null; // error, too many required params this.a2 = () => null; // ok, same T of required params this.a2 = (x?: T) => null; // ok, same T of required params this.a2 = (x: T) => null; // ok, same number of params this.a3 = () => null; // ok, fewer required params this.a3 = (x?: T) => null; // ok, fewer required params this.a3 = (x: T) => null; // ok, same T of required params this.a3 = (x: T, y: T) => null; // error, too many required params this.a4 = () => null; // ok, fewer required params this.a4 = (x?: T, y?: T) => null; // ok, fewer required params this.a4 = (x: T) => null; // ok, same T of required params this.a4 = (x: T, y: T) => null; // ok, same number of params this.a5 = () => null; // ok, fewer required params this.a5 = (x?: T, y?: T) => null; // ok, fewer required params this.a5 = (x: T) => null; // ok, all present params match this.a5 = (x: T, y: T) => null; // ok, same number of params } : () => void
|
||||
|
||||
this.a = () => null; // ok, same T of required params
|
||||
>this.a = () => null : () => any
|
||||
>this.a = () => null : () => null
|
||||
>this.a : () => T
|
||||
>this : this
|
||||
>a : () => T
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
this.a = (x?: T) => null; // ok, same T of required params
|
||||
>this.a = (x?: T) => null : (x?: T) => any
|
||||
>this.a = (x?: T) => null : (x?: T) => null
|
||||
>this.a : () => T
|
||||
>this : this
|
||||
>a : () => T
|
||||
>(x?: T) => null : (x?: T) => any
|
||||
>(x?: T) => null : (x?: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
@@ -59,54 +59,54 @@ module ClassTypeParam {
|
||||
>null : null
|
||||
|
||||
this.a2 = () => null; // ok, same T of required params
|
||||
>this.a2 = () => null : () => any
|
||||
>this.a2 = () => null : () => null
|
||||
>this.a2 : (x?: T) => T
|
||||
>this : this
|
||||
>a2 : (x?: T) => T
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
this.a2 = (x?: T) => null; // ok, same T of required params
|
||||
>this.a2 = (x?: T) => null : (x?: T) => any
|
||||
>this.a2 = (x?: T) => null : (x?: T) => null
|
||||
>this.a2 : (x?: T) => T
|
||||
>this : this
|
||||
>a2 : (x?: T) => T
|
||||
>(x?: T) => null : (x?: T) => any
|
||||
>(x?: T) => null : (x?: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a2 = (x: T) => null; // ok, same number of params
|
||||
>this.a2 = (x: T) => null : (x: T) => any
|
||||
>this.a2 = (x: T) => null : (x: T) => null
|
||||
>this.a2 : (x?: T) => T
|
||||
>this : this
|
||||
>a2 : (x?: T) => T
|
||||
>(x: T) => null : (x: T) => any
|
||||
>(x: T) => null : (x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a3 = () => null; // ok, fewer required params
|
||||
>this.a3 = () => null : () => any
|
||||
>this.a3 = () => null : () => null
|
||||
>this.a3 : (x: T) => T
|
||||
>this : this
|
||||
>a3 : (x: T) => T
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
this.a3 = (x?: T) => null; // ok, fewer required params
|
||||
>this.a3 = (x?: T) => null : (x?: T) => any
|
||||
>this.a3 = (x?: T) => null : (x?: T) => null
|
||||
>this.a3 : (x: T) => T
|
||||
>this : this
|
||||
>a3 : (x: T) => T
|
||||
>(x?: T) => null : (x?: T) => any
|
||||
>(x?: T) => null : (x?: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a3 = (x: T) => null; // ok, same T of required params
|
||||
>this.a3 = (x: T) => null : (x: T) => any
|
||||
>this.a3 = (x: T) => null : (x: T) => null
|
||||
>this.a3 : (x: T) => T
|
||||
>this : this
|
||||
>a3 : (x: T) => T
|
||||
>(x: T) => null : (x: T) => any
|
||||
>(x: T) => null : (x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
@@ -121,76 +121,76 @@ module ClassTypeParam {
|
||||
>null : null
|
||||
|
||||
this.a4 = () => null; // ok, fewer required params
|
||||
>this.a4 = () => null : () => any
|
||||
>this.a4 = () => null : () => null
|
||||
>this.a4 : (x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : (x: T, y?: T) => T
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
this.a4 = (x?: T, y?: T) => null; // ok, fewer required params
|
||||
>this.a4 = (x?: T, y?: T) => null : (x?: T, y?: T) => any
|
||||
>this.a4 = (x?: T, y?: T) => null : (x?: T, y?: T) => null
|
||||
>this.a4 : (x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : (x: T, y?: T) => T
|
||||
>(x?: T, y?: T) => null : (x?: T, y?: T) => any
|
||||
>(x?: T, y?: T) => null : (x?: T, y?: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
this.a4 = (x: T) => null; // ok, same T of required params
|
||||
>this.a4 = (x: T) => null : (x: T) => any
|
||||
>this.a4 = (x: T) => null : (x: T) => null
|
||||
>this.a4 : (x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : (x: T, y?: T) => T
|
||||
>(x: T) => null : (x: T) => any
|
||||
>(x: T) => null : (x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a4 = (x: T, y: T) => null; // ok, same number of params
|
||||
>this.a4 = (x: T, y: T) => null : (x: T, y: T) => any
|
||||
>this.a4 = (x: T, y: T) => null : (x: T, y: T) => null
|
||||
>this.a4 : (x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : (x: T, y?: T) => T
|
||||
>(x: T, y: T) => null : (x: T, y: T) => any
|
||||
>(x: T, y: T) => null : (x: T, y: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
|
||||
this.a5 = () => null; // ok, fewer required params
|
||||
>this.a5 = () => null : () => any
|
||||
>this.a5 = () => null : () => null
|
||||
>this.a5 : (x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : (x?: T, y?: T) => T
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
this.a5 = (x?: T, y?: T) => null; // ok, fewer required params
|
||||
>this.a5 = (x?: T, y?: T) => null : (x?: T, y?: T) => any
|
||||
>this.a5 = (x?: T, y?: T) => null : (x?: T, y?: T) => null
|
||||
>this.a5 : (x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : (x?: T, y?: T) => T
|
||||
>(x?: T, y?: T) => null : (x?: T, y?: T) => any
|
||||
>(x?: T, y?: T) => null : (x?: T, y?: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
this.a5 = (x: T) => null; // ok, all present params match
|
||||
>this.a5 = (x: T) => null : (x: T) => any
|
||||
>this.a5 = (x: T) => null : (x: T) => null
|
||||
>this.a5 : (x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : (x?: T, y?: T) => T
|
||||
>(x: T) => null : (x: T) => any
|
||||
>(x: T) => null : (x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a5 = (x: T, y: T) => null; // ok, same number of params
|
||||
>this.a5 = (x: T, y: T) => null : (x: T, y: T) => any
|
||||
>this.a5 = (x: T, y: T) => null : (x: T, y: T) => null
|
||||
>this.a5 : (x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : (x?: T, y?: T) => T
|
||||
>(x: T, y: T) => null : (x: T, y: T) => any
|
||||
>(x: T, y: T) => null : (x: T, y: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
@@ -521,19 +521,19 @@ module GenericSignaturesValid {
|
||||
>() => { this.a = <T>() => null; // ok, same T of required params this.a = <T>(x?: T) => null; // ok, same T of required params this.a = <T>(x: T) => null; // error, too many required params this.a2 = <T>() => null; // ok, same T of required params this.a2 = <T>(x?: T) => null; // ok, same T of required params this.a2 = <T>(x: T) => null; // ok, same number of params this.a3 = <T>() => null; // ok, fewer required params this.a3 = <T>(x?: T) => null; // ok, fewer required params this.a3 = <T>(x: T) => null; // ok, same T of required params this.a3 = <T>(x: T, y: T) => null; // error, too many required params this.a4 = <T>() => null; // ok, fewer required params this.a4 = <T>(x?: T, y?: T) => null; // ok, fewer required params this.a4 = <T>(x: T) => null; // ok, same T of required params this.a4 = <T>(x: T, y: T) => null; // ok, same number of params this.a5 = <T>() => null; // ok, fewer required params this.a5 = <T>(x?: T, y?: T) => null; // ok, fewer required params this.a5 = <T>(x: T) => null; // ok, all present params match this.a5 = <T>(x: T, y: T) => null; // ok, same number of params } : () => void
|
||||
|
||||
this.a = <T>() => null; // ok, same T of required params
|
||||
>this.a = <T>() => null : <T>() => any
|
||||
>this.a = <T>() => null : <T>() => null
|
||||
>this.a : <T>() => T
|
||||
>this : this
|
||||
>a : <T>() => T
|
||||
><T>() => null : <T>() => any
|
||||
><T>() => null : <T>() => null
|
||||
>null : null
|
||||
|
||||
this.a = <T>(x?: T) => null; // ok, same T of required params
|
||||
>this.a = <T>(x?: T) => null : <T>(x?: T) => any
|
||||
>this.a = <T>(x?: T) => null : <T>(x?: T) => null
|
||||
>this.a : <T>() => T
|
||||
>this : this
|
||||
>a : <T>() => T
|
||||
><T>(x?: T) => null : <T>(x?: T) => any
|
||||
><T>(x?: T) => null : <T>(x?: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
@@ -547,54 +547,54 @@ module GenericSignaturesValid {
|
||||
>null : null
|
||||
|
||||
this.a2 = <T>() => null; // ok, same T of required params
|
||||
>this.a2 = <T>() => null : <T>() => any
|
||||
>this.a2 = <T>() => null : <T>() => null
|
||||
>this.a2 : <T>(x?: T) => T
|
||||
>this : this
|
||||
>a2 : <T>(x?: T) => T
|
||||
><T>() => null : <T>() => any
|
||||
><T>() => null : <T>() => null
|
||||
>null : null
|
||||
|
||||
this.a2 = <T>(x?: T) => null; // ok, same T of required params
|
||||
>this.a2 = <T>(x?: T) => null : <T>(x?: T) => any
|
||||
>this.a2 = <T>(x?: T) => null : <T>(x?: T) => null
|
||||
>this.a2 : <T>(x?: T) => T
|
||||
>this : this
|
||||
>a2 : <T>(x?: T) => T
|
||||
><T>(x?: T) => null : <T>(x?: T) => any
|
||||
><T>(x?: T) => null : <T>(x?: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a2 = <T>(x: T) => null; // ok, same number of params
|
||||
>this.a2 = <T>(x: T) => null : <T>(x: T) => any
|
||||
>this.a2 = <T>(x: T) => null : <T>(x: T) => null
|
||||
>this.a2 : <T>(x?: T) => T
|
||||
>this : this
|
||||
>a2 : <T>(x?: T) => T
|
||||
><T>(x: T) => null : <T>(x: T) => any
|
||||
><T>(x: T) => null : <T>(x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a3 = <T>() => null; // ok, fewer required params
|
||||
>this.a3 = <T>() => null : <T>() => any
|
||||
>this.a3 = <T>() => null : <T>() => null
|
||||
>this.a3 : <T>(x: T) => T
|
||||
>this : this
|
||||
>a3 : <T>(x: T) => T
|
||||
><T>() => null : <T>() => any
|
||||
><T>() => null : <T>() => null
|
||||
>null : null
|
||||
|
||||
this.a3 = <T>(x?: T) => null; // ok, fewer required params
|
||||
>this.a3 = <T>(x?: T) => null : <T>(x?: T) => any
|
||||
>this.a3 = <T>(x?: T) => null : <T>(x?: T) => null
|
||||
>this.a3 : <T>(x: T) => T
|
||||
>this : this
|
||||
>a3 : <T>(x: T) => T
|
||||
><T>(x?: T) => null : <T>(x?: T) => any
|
||||
><T>(x?: T) => null : <T>(x?: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a3 = <T>(x: T) => null; // ok, same T of required params
|
||||
>this.a3 = <T>(x: T) => null : <T>(x: T) => any
|
||||
>this.a3 = <T>(x: T) => null : <T>(x: T) => null
|
||||
>this.a3 : <T>(x: T) => T
|
||||
>this : this
|
||||
>a3 : <T>(x: T) => T
|
||||
><T>(x: T) => null : <T>(x: T) => any
|
||||
><T>(x: T) => null : <T>(x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
@@ -609,76 +609,76 @@ module GenericSignaturesValid {
|
||||
>null : null
|
||||
|
||||
this.a4 = <T>() => null; // ok, fewer required params
|
||||
>this.a4 = <T>() => null : <T>() => any
|
||||
>this.a4 = <T>() => null : <T>() => null
|
||||
>this.a4 : <T>(x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : <T>(x: T, y?: T) => T
|
||||
><T>() => null : <T>() => any
|
||||
><T>() => null : <T>() => null
|
||||
>null : null
|
||||
|
||||
this.a4 = <T>(x?: T, y?: T) => null; // ok, fewer required params
|
||||
>this.a4 = <T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => any
|
||||
>this.a4 = <T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => null
|
||||
>this.a4 : <T>(x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : <T>(x: T, y?: T) => T
|
||||
><T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => any
|
||||
><T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
this.a4 = <T>(x: T) => null; // ok, same T of required params
|
||||
>this.a4 = <T>(x: T) => null : <T>(x: T) => any
|
||||
>this.a4 = <T>(x: T) => null : <T>(x: T) => null
|
||||
>this.a4 : <T>(x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : <T>(x: T, y?: T) => T
|
||||
><T>(x: T) => null : <T>(x: T) => any
|
||||
><T>(x: T) => null : <T>(x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a4 = <T>(x: T, y: T) => null; // ok, same number of params
|
||||
>this.a4 = <T>(x: T, y: T) => null : <T>(x: T, y: T) => any
|
||||
>this.a4 = <T>(x: T, y: T) => null : <T>(x: T, y: T) => null
|
||||
>this.a4 : <T>(x: T, y?: T) => T
|
||||
>this : this
|
||||
>a4 : <T>(x: T, y?: T) => T
|
||||
><T>(x: T, y: T) => null : <T>(x: T, y: T) => any
|
||||
><T>(x: T, y: T) => null : <T>(x: T, y: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
|
||||
this.a5 = <T>() => null; // ok, fewer required params
|
||||
>this.a5 = <T>() => null : <T>() => any
|
||||
>this.a5 = <T>() => null : <T>() => null
|
||||
>this.a5 : <T>(x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : <T>(x?: T, y?: T) => T
|
||||
><T>() => null : <T>() => any
|
||||
><T>() => null : <T>() => null
|
||||
>null : null
|
||||
|
||||
this.a5 = <T>(x?: T, y?: T) => null; // ok, fewer required params
|
||||
>this.a5 = <T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => any
|
||||
>this.a5 = <T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => null
|
||||
>this.a5 : <T>(x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : <T>(x?: T, y?: T) => T
|
||||
><T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => any
|
||||
><T>(x?: T, y?: T) => null : <T>(x?: T, y?: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
this.a5 = <T>(x: T) => null; // ok, all present params match
|
||||
>this.a5 = <T>(x: T) => null : <T>(x: T) => any
|
||||
>this.a5 = <T>(x: T) => null : <T>(x: T) => null
|
||||
>this.a5 : <T>(x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : <T>(x?: T, y?: T) => T
|
||||
><T>(x: T) => null : <T>(x: T) => any
|
||||
><T>(x: T) => null : <T>(x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
this.a5 = <T>(x: T, y: T) => null; // ok, same number of params
|
||||
>this.a5 = <T>(x: T, y: T) => null : <T>(x: T, y: T) => any
|
||||
>this.a5 = <T>(x: T, y: T) => null : <T>(x: T, y: T) => null
|
||||
>this.a5 : <T>(x?: T, y?: T) => T
|
||||
>this : this
|
||||
>a5 : <T>(x?: T, y?: T) => T
|
||||
><T>(x: T, y: T) => null : <T>(x: T, y: T) => any
|
||||
><T>(x: T, y: T) => null : <T>(x: T, y: T) => null
|
||||
>x : T
|
||||
>y : T
|
||||
>null : null
|
||||
|
||||
@@ -17,11 +17,11 @@ interface Transform3D {
|
||||
|
||||
var style: IBookStyle = {
|
||||
>style : IBookStyle
|
||||
>{ initialLeftPageTransforms: (width: number) => { return [ {'ry': null } ]; }} : { initialLeftPageTransforms: (width: number) => { ry: any; }[]; }
|
||||
>{ initialLeftPageTransforms: (width: number) => { return [ {'ry': null } ]; }} : { initialLeftPageTransforms: (width: number) => { ry: null; }[]; }
|
||||
|
||||
initialLeftPageTransforms: (width: number) => {
|
||||
>initialLeftPageTransforms : (width: number) => { ry: any; }[]
|
||||
>(width: number) => { return [ {'ry': null } ]; } : (width: number) => { ry: any; }[]
|
||||
>initialLeftPageTransforms : (width: number) => { ry: null; }[]
|
||||
>(width: number) => { return [ {'ry': null } ]; } : (width: number) => { ry: null; }[]
|
||||
>width : number
|
||||
|
||||
return [
|
||||
|
||||
@@ -9,7 +9,7 @@ interface StatelessComponent<P = {}> {
|
||||
|
||||
const TestComponent: StatelessComponent<TestProps> = (props) => {
|
||||
>TestComponent : StatelessComponent<TestProps>
|
||||
>(props) => { return null;} : (props: TestProps & { children?: number; }) => any
|
||||
>(props) => { return null;} : (props: TestProps & { children?: number; }) => null
|
||||
>props : TestProps & { children?: number; }
|
||||
|
||||
return null;
|
||||
@@ -48,7 +48,7 @@ const TestComponent2: StatelessComponent<TestProps | {props2: {x: number}}> = (p
|
||||
>TestComponent2 : StatelessComponent<TestProps | { props2: { x: number;}; }>
|
||||
>props2 : { x: number; }
|
||||
>x : number
|
||||
>(props) => { return null;} : (props: (TestProps & { children?: number; }) | ({ props2: { x: number;}; } & { children?: number; })) => any
|
||||
>(props) => { return null;} : (props: (TestProps & { children?: number; }) | ({ props2: { x: number;}; } & { children?: number; })) => null
|
||||
>props : (TestProps & { children?: number; }) | ({ props2: { x: number; }; } & { children?: number; })
|
||||
|
||||
return null;
|
||||
|
||||
+40
-18
@@ -1,16 +1,25 @@
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(21,19): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; b: number; c: number; }'.
|
||||
Property 'c' is missing in type '{ a: number; b: number; }' but required in type '{ a: number; b: number; c: number; }'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(10,9): error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(17,13): error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(27,47): error TS2345: Argument of type '{ a: number; b: number; c: number; }' is not assignable to parameter of type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(38,37): error TS2345: Argument of type '{ a: number; b: number; c: number; }' is not assignable to parameter of type '{ a: number; b: number; }'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type '{ a: number; b: number; }'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(64,19): error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; b: number; c: number; }'.
|
||||
Property 'c' is missing in type '{ a: number; b: number; }' but required in type '{ a: number; b: number; c: number; }'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(35,9): error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(50,13): error TS2345: Argument of type '() => { a: number; b: number; c: number; }' is not assignable to parameter of type '() => SomeObj1'.
|
||||
Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(59,17): error TS2322: Type '() => { a: number; b: number; c: number; }' is not assignable to type '() => SomeObj1'.
|
||||
Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47): error TS2345: Argument of type '{ a: number; b: number; c: number; }' is not assignable to parameter of type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(84,13): error TS2345: Argument of type '() => { a: number; b: number; c: number; }' is not assignable to parameter of type '() => SomeObj1'.
|
||||
Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts (5 errors) ====
|
||||
==== tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts (8 errors) ====
|
||||
export type SomeObj1 = { a: number, b: number };
|
||||
|
||||
declare function valueOrGetter<T>(x: T, f: () => T): T;
|
||||
@@ -21,6 +30,10 @@ tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47):
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
!!! related TS6502 tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts:6:37: The expected type comes from the return type of this signature.
|
||||
}));
|
||||
|
||||
function obj1FactoryFactory(): () => SomeObj1 {
|
||||
@@ -28,14 +41,14 @@ tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47):
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
!!! related TS6502 tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts:13:36: The expected type comes from the return type of this signature.
|
||||
});
|
||||
}
|
||||
|
||||
valueOrGetter({ a: 100, b: 200 }, () => ({
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; b: number; c: number; }'.
|
||||
!!! error TS2345: Property 'c' is missing in type '{ a: number; b: number; }' but required in type '{ a: number; b: number; c: number; }'.
|
||||
!!! related TS2728 tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts:24:9: 'c' is declared here.
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
@@ -53,12 +66,13 @@ tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47):
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
!!! related TS6502 tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts:3:44: The expected type comes from the return type of this signature.
|
||||
}));
|
||||
|
||||
valueOrGetter({ a: 100, b: 200, c: 300 }, () => ({
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '{ a: number; b: number; c: number; }' is not assignable to parameter of type '{ a: number; b: number; }'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'c' does not exist in type '{ a: number; b: number; }'.
|
||||
a: 100,
|
||||
b: 200,
|
||||
}));
|
||||
@@ -71,6 +85,10 @@ tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47):
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '() => { a: number; b: number; c: number; }' is not assignable to parameter of type '() => SomeObj1'.
|
||||
!!! error TS2345: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
};
|
||||
});
|
||||
|
||||
@@ -80,15 +98,15 @@ tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47):
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '() => { a: number; b: number; c: number; }' is not assignable to type '() => SomeObj1'.
|
||||
!!! error TS2322: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
!!! error TS2322: Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
valueOrGetter({ a: 100, b: 200 }, function() {
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2345: Argument of type '{ a: number; b: number; }' is not assignable to parameter of type '{ a: number; b: number; c: number; }'.
|
||||
!!! error TS2345: Property 'c' is missing in type '{ a: number; b: number; }' but required in type '{ a: number; b: number; c: number; }'.
|
||||
!!! related TS2728 tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts:68:13: 'c' is declared here.
|
||||
return {
|
||||
a: 100,
|
||||
b: 200,
|
||||
@@ -112,6 +130,10 @@ tests/cases/compiler/excessPropertyErrorForFunctionExpressionReturns.ts(72,47):
|
||||
a: 100,
|
||||
b: 200,
|
||||
c: 300,
|
||||
~~~~~~
|
||||
!!! error TS2345: Argument of type '() => { a: number; b: number; c: number; }' is not assignable to parameter of type '() => SomeObj1'.
|
||||
!!! error TS2345: Type '{ a: number; b: number; c: number; }' is not assignable to type 'SomeObj1'.
|
||||
!!! error TS2345: Object literal may only specify known properties, and 'c' does not exist in type 'SomeObj1'.
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace arrows {
|
||||
}
|
||||
|
||||
valueOrGetter({ a: 100, b: 200 }, () => ({
|
||||
>valueOrGetter({ a: 100, b: 200 }, () => ({ a: 100, b: 200, c: 300, })) : { a: number; b: number; c: number; }
|
||||
>valueOrGetter({ a: 100, b: 200 }, () => ({ a: 100, b: 200, c: 300, })) : { a: number; b: number; c?: undefined; } | { a: number; b: number; c: number; }
|
||||
>valueOrGetter : <T>(x: T, f: () => T) => T
|
||||
>{ a: 100, b: 200 } : { a: number; b: number; }
|
||||
>a : number
|
||||
@@ -137,7 +137,7 @@ namespace arrows {
|
||||
}));
|
||||
|
||||
valueOrGetter({ a: 100, b: 200, c: 300 }, () => ({
|
||||
>valueOrGetter({ a: 100, b: 200, c: 300 }, () => ({ a: 100, b: 200, })) : { a: number; b: number; }
|
||||
>valueOrGetter({ a: 100, b: 200, c: 300 }, () => ({ a: 100, b: 200, })) : { a: number; b: number; c: number; } | { a: number; b: number; c?: undefined; }
|
||||
>valueOrGetter : <T>(x: T, f: () => T) => T
|
||||
>{ a: 100, b: 200, c: 300 } : { a: number; b: number; c: number; }
|
||||
>a : number
|
||||
@@ -216,7 +216,7 @@ namespace funcExprs {
|
||||
}
|
||||
|
||||
valueOrGetter({ a: 100, b: 200 }, function() {
|
||||
>valueOrGetter({ a: 100, b: 200 }, function() { return { a: 100, b: 200, c: 300, }; }) : { a: number; b: number; }
|
||||
>valueOrGetter({ a: 100, b: 200 }, function() { return { a: 100, b: 200, c: 300, }; }) : { a: number; b: number; c?: undefined; } | { a: number; b: number; c: number; }
|
||||
>valueOrGetter : <T>(x: T, f: () => T) => T
|
||||
>{ a: 100, b: 200 } : { a: number; b: number; }
|
||||
>a : number
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
const MyComponent = () => /* @type {any} */(null);
|
||||
>MyComponent : { (): any; defaultProps?: Partial<{ color: "red" | "blue"; }>; }
|
||||
>() => /* @type {any} */(null) : { (): any; defaultProps: Partial<{ color: "red" | "blue"; }>; }
|
||||
>() => /* @type {any} */(null) : { (): null; defaultProps: Partial<{ color: "red" | "blue"; }>; }
|
||||
>(null) : null
|
||||
>null : null
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ f("", x => null, x => x.toLowerCase());
|
||||
>f("", x => null, x => x.toLowerCase()) : string
|
||||
>f : <T>(x: T, y: (p: T) => T, z: (p: T) => T) => T
|
||||
>"" : ""
|
||||
>x => null : (x: string) => any
|
||||
>x => null : (x: string) => null
|
||||
>x : string
|
||||
>null : null
|
||||
>x => x.toLowerCase() : (x: string) => string
|
||||
@@ -34,10 +34,10 @@ declare function g();
|
||||
>g : { <T>(x: T, y: (p: T) => T, z: (p: T) => T): T; (): any; }
|
||||
|
||||
g("", x => null, x => x.toLowerCase());
|
||||
>g("", x => null, x => x.toLowerCase()) : any
|
||||
>g("", x => null, x => x.toLowerCase()) : string
|
||||
>g : { <T>(x: T, y: (p: T) => T, z: (p: T) => T): T; (): any; }
|
||||
>"" : ""
|
||||
>x => null : (x: string) => any
|
||||
>x => null : (x: string) => null
|
||||
>x : string
|
||||
>null : null
|
||||
>x => x.toLowerCase() : (x: string) => string
|
||||
|
||||
@@ -11,7 +11,7 @@ var g : {
|
||||
|
||||
<S>() : S[];
|
||||
} = () => [];
|
||||
>() => [] : () => any[]
|
||||
>() => [] : () => undefined[]
|
||||
>[] : undefined[]
|
||||
|
||||
f = g;
|
||||
|
||||
@@ -103,7 +103,7 @@ var x10: {n: Base[]; } = { n: [d1, d2] };
|
||||
var x11: (s: Base[]) => any = n => { var n: Base[]; return null; };
|
||||
>x11 : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -204,7 +204,7 @@ class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } }
|
||||
>x23 : x23
|
||||
>member : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -306,7 +306,7 @@ class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return nu
|
||||
>x35 : x35
|
||||
>member : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -408,7 +408,7 @@ class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return nul
|
||||
>x47 : x47
|
||||
>member : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -510,7 +510,7 @@ class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return nul
|
||||
>x59 : x59
|
||||
>member : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -612,7 +612,7 @@ class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; re
|
||||
>x71 : x71
|
||||
>member : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -714,7 +714,7 @@ class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; ret
|
||||
>x83 : x83
|
||||
>member : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -816,7 +816,7 @@ class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return
|
||||
>x95 : x95
|
||||
>parm : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -918,7 +918,7 @@ class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[];
|
||||
>x107 : x107
|
||||
>parm : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1020,7 +1020,7 @@ class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]
|
||||
>x119 : x119
|
||||
>parm : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1122,7 +1122,7 @@ function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) {
|
||||
>x131 : (parm?: (s: Base[]) => any) => void
|
||||
>parm : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1213,7 +1213,7 @@ function x142(): {n: Base[]; } { return { n: [d1, d2] }; }
|
||||
function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; }
|
||||
>x143 : () => (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1343,11 +1343,11 @@ function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }
|
||||
function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; }
|
||||
>x155 : () => (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1454,8 +1454,8 @@ var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; };
|
||||
var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; };
|
||||
>x167 : () => (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>() => { return n => { var n: Base[]; return null; }; } : () => (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>() => { return n => { var n: Base[]; return null; }; } : () => (n: Base[]) => null
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1556,8 +1556,8 @@ var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; };
|
||||
var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; };
|
||||
>x179 : () => (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>function() { return n => { var n: Base[]; return null; }; } : () => (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>function() { return n => { var n: Base[]; return null; }; } : () => (n: Base[]) => null
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1659,7 +1659,7 @@ module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; };
|
||||
>x191 : typeof x191
|
||||
>t : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -1761,7 +1761,7 @@ module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return nu
|
||||
>x203 : typeof x203
|
||||
>t : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -2039,9 +2039,9 @@ var x234: {n: Base[]; } ; x234 = { n: [d1, d2] };
|
||||
var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; };
|
||||
>x235 : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>x235 = n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>x235 = n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>x235 : (s: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -2164,9 +2164,9 @@ var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; }
|
||||
>x247 : { n: (s: Base[]) => any; }
|
||||
>n : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>{ n: n => { var n: Base[]; return null; } } : { n: (n: Base[]) => any; }
|
||||
>n : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>{ n: n => { var n: Base[]; return null; } } : { n: (n: Base[]) => null; }
|
||||
>n : (n: Base[]) => null
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -2633,13 +2633,13 @@ var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] };
|
||||
var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; };
|
||||
>x295 : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>true : true
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -2768,10 +2768,10 @@ var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] };
|
||||
var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; };
|
||||
>x307 : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>true ? undefined : n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>true ? undefined : n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>true : true
|
||||
>undefined : undefined
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -2894,9 +2894,9 @@ var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined;
|
||||
var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined;
|
||||
>x319 : (s: Base[]) => any
|
||||
>s : Base[]
|
||||
>true ? n => { var n: Base[]; return null; } : undefined : (n: Base[]) => any
|
||||
>true ? n => { var n: Base[]; return null; } : undefined : (n: Base[]) => null
|
||||
>true : true
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -3023,7 +3023,7 @@ function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null
|
||||
>s : Base[]
|
||||
>x331(n => { var n: Base[]; return null; }) : void
|
||||
>x331 : (n: (s: Base[]) => any) => void
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -3171,7 +3171,7 @@ var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null;
|
||||
>n : (s: Base[]) => any
|
||||
>x343(n => { var n: Base[]; return null; }) : (s: Base[]) => any
|
||||
>x343 : (n: (s: Base[]) => any) => (s: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
@@ -3310,7 +3310,7 @@ var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; retur
|
||||
>s : Base[]
|
||||
>x355(n => { var n: Base[]; return null; }) : void
|
||||
>x355 : (n: (s: Base[]) => any) => void
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => any
|
||||
>n => { var n: Base[]; return null; } : (n: Base[]) => null
|
||||
>n : Base[]
|
||||
>n : Base[]
|
||||
>null : null
|
||||
|
||||
@@ -18,7 +18,7 @@ foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, sh
|
||||
>x.length : number
|
||||
>x : string
|
||||
>length : number
|
||||
>p => undefined : (p: number) => any
|
||||
>p => undefined : (p: number) => undefined
|
||||
>p : number
|
||||
>undefined : undefined
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ foo("", function* () {
|
||||
}
|
||||
}
|
||||
}, p => undefined); // T is fixed, should be string
|
||||
>p => undefined : (p: number) => any
|
||||
>p => undefined : (p: number) => undefined
|
||||
>p : number
|
||||
>undefined : undefined
|
||||
|
||||
|
||||
@@ -77,10 +77,10 @@ export const Nothing2: Strategy<State> = strategy("Nothing", function*(state: St
|
||||
|
||||
export const Nothing3: Strategy<State> = strategy("Nothing", function* (state: State) {
|
||||
>Nothing3 : Strategy<State>
|
||||
>strategy("Nothing", function* (state: State) { yield ; return state;}) : (a: any) => IterableIterator<any>
|
||||
>strategy("Nothing", function* (state: State) { yield ; return state;}) : (a: State) => IterableIterator<State>
|
||||
>strategy : <T extends StrategicState>(stratName: string, gen: (a: T) => IterableIterator<T>) => (a: T) => IterableIterator<T>
|
||||
>"Nothing" : "Nothing"
|
||||
>function* (state: State) { yield ; return state;} : (state: State) => Generator<any, State, undefined>
|
||||
>function* (state: State) { yield ; return state;} : (state: State) => Generator<undefined, State, undefined>
|
||||
>state : State
|
||||
|
||||
yield ;
|
||||
|
||||
@@ -30,10 +30,10 @@ var r1b = foo((x) => 1, (x) => ''); // {} => {}
|
||||
>'' : ""
|
||||
|
||||
var r2 = foo((x: Object) => null, (x: string) => ''); // Object => Object
|
||||
>r2 : (x: any) => any
|
||||
>foo((x: Object) => null, (x: string) => '') : (x: any) => any
|
||||
>r2 : (x: Object) => Object
|
||||
>foo((x: Object) => null, (x: string) => '') : (x: Object) => Object
|
||||
>foo : <T>(a: (x: T) => T, b: (x: T) => T) => (x: T) => T
|
||||
>(x: Object) => null : (x: Object) => any
|
||||
>(x: Object) => null : (x: Object) => null
|
||||
>x : Object
|
||||
>null : null
|
||||
>(x: string) => '' : (x: string) => string
|
||||
@@ -41,13 +41,13 @@ var r2 = foo((x: Object) => null, (x: string) => ''); // Object => Object
|
||||
>'' : ""
|
||||
|
||||
var r3 = foo((x: number) => 1, (x: Object) => null); // number => number
|
||||
>r3 : (x: any) => any
|
||||
>foo((x: number) => 1, (x: Object) => null) : (x: any) => any
|
||||
>r3 : (x: Object) => Object
|
||||
>foo((x: number) => 1, (x: Object) => null) : (x: Object) => Object
|
||||
>foo : <T>(a: (x: T) => T, b: (x: T) => T) => (x: T) => T
|
||||
>(x: number) => 1 : (x: number) => number
|
||||
>x : number
|
||||
>1 : 1
|
||||
>(x: Object) => null : (x: Object) => any
|
||||
>(x: Object) => null : (x: Object) => null
|
||||
>x : Object
|
||||
>null : null
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@ function foo<T>(x: T, a: (x: T) => T, b: (x: T) => T) {
|
||||
}
|
||||
|
||||
var r1 = foo('', (x: string) => '', (x: Object) => null); // any => any
|
||||
>r1 : (x: any) => any
|
||||
>foo('', (x: string) => '', (x: Object) => null) : (x: any) => any
|
||||
>r1 : (x: Object) => Object
|
||||
>foo('', (x: string) => '', (x: Object) => null) : (x: Object) => Object
|
||||
>foo : <T>(x: T, a: (x: T) => T, b: (x: T) => T) => (x: T) => T
|
||||
>'' : ""
|
||||
>(x: string) => '' : (x: string) => string
|
||||
>x : string
|
||||
>'' : ""
|
||||
>(x: Object) => null : (x: Object) => any
|
||||
>(x: Object) => null : (x: Object) => null
|
||||
>x : Object
|
||||
>null : null
|
||||
|
||||
@@ -38,7 +38,7 @@ var r1ii = foo('', (x) => '', (x) => null); // string => string
|
||||
>(x) => '' : (x: string) => string
|
||||
>x : string
|
||||
>'' : ""
|
||||
>(x) => null : (x: string) => any
|
||||
>(x) => null : (x: string) => null
|
||||
>x : string
|
||||
>null : null
|
||||
|
||||
@@ -135,14 +135,14 @@ function foo2<T, U>(x: T, a: (x: T) => U, b: (x: T) => U) {
|
||||
}
|
||||
|
||||
var r8 = foo2('', (x) => '', (x) => null); // string => string
|
||||
>r8 : (x: string) => any
|
||||
>foo2('', (x) => '', (x) => null) : (x: string) => any
|
||||
>r8 : (x: string) => string
|
||||
>foo2('', (x) => '', (x) => null) : (x: string) => string
|
||||
>foo2 : <T, U>(x: T, a: (x: T) => U, b: (x: T) => U) => (x: T) => U
|
||||
>'' : ""
|
||||
>(x) => '' : (x: string) => string
|
||||
>x : string
|
||||
>'' : ""
|
||||
>(x) => null : (x: string) => any
|
||||
>(x) => null : (x: string) => null
|
||||
>x : string
|
||||
>null : null
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ var r = < <T>(x: T) => T > ((x) => { return null; }); // bug was 'could not find
|
||||
>r : <T>(x: T) => T
|
||||
>< <T>(x: T) => T > ((x) => { return null; }) : <T>(x: T) => T
|
||||
>x : T
|
||||
>((x) => { return null; }) : <T>(x: T) => any
|
||||
>(x) => { return null; } : <T>(x: T) => any
|
||||
>((x) => { return null; }) : <T>(x: T) => null
|
||||
>(x) => { return null; } : <T>(x: T) => null
|
||||
>x : T
|
||||
>null : null
|
||||
|
||||
@@ -12,8 +12,8 @@ var s = < <T>(x: T) => T > ((x: any) => { return null; }); // no error
|
||||
>s : <T>(x: T) => T
|
||||
>< <T>(x: T) => T > ((x: any) => { return null; }) : <T>(x: T) => T
|
||||
>x : T
|
||||
>((x: any) => { return null; }) : (x: any) => any
|
||||
>(x: any) => { return null; } : (x: any) => any
|
||||
>((x: any) => { return null; }) : (x: any) => null
|
||||
>(x: any) => { return null; } : (x: any) => null
|
||||
>x : any
|
||||
>null : null
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts(28,30): error TS2345: Argument of type 'string' is not assignable to parameter of type '"bar"'.
|
||||
tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts(175,47): error TS2322: Type 'boolean' is not assignable to type 'true'.
|
||||
tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts(180,26): error TS2322: Type '{ state: State.A; }[] | { state: State.B; }[]' is not assignable to type '{ state: State.A; }[]'.
|
||||
Type '{ state: State.B; }[]' is not assignable to type '{ state: State.A; }[]'.
|
||||
Type '{ state: State.B; }' is not assignable to type '{ state: State.A; }'.
|
||||
Types of property 'state' are incompatible.
|
||||
Type 'State.B' is not assignable to type 'State.A'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts (3 errors) ====
|
||||
==== tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts (2 errors) ====
|
||||
// Repros from #5487
|
||||
|
||||
function truePromise(): Promise<true> {
|
||||
@@ -193,13 +188,6 @@ tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts(180,26): error TS23
|
||||
type Foo = { state: State }
|
||||
declare function bar<T>(f: () => T[]): T[];
|
||||
let x: Foo[] = bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]); // Error
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ state: State.A; }[] | { state: State.B; }[]' is not assignable to type '{ state: State.A; }[]'.
|
||||
!!! error TS2322: Type '{ state: State.B; }[]' is not assignable to type '{ state: State.A; }[]'.
|
||||
!!! error TS2322: Type '{ state: State.B; }' is not assignable to type '{ state: State.A; }'.
|
||||
!!! error TS2322: Types of property 'state' are incompatible.
|
||||
!!! error TS2322: Type 'State.B' is not assignable to type 'State.A'.
|
||||
!!! related TS6502 tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts:179:28: The expected type comes from the return type of this signature.
|
||||
|
||||
// Repros from #31443
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ declare function bar<T>(f: () => T[]): T[];
|
||||
|
||||
let x: Foo[] = bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]); // Error
|
||||
>x : Foo[]
|
||||
>bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]) : { state: State.A; }[]
|
||||
>bar(() => !!true ? [{ state: State.A }] : [{ state: State.B }]) : ({ state: State.A; } | { state: State.B; })[]
|
||||
>bar : <T>(f: () => T[]) => T[]
|
||||
>() => !!true ? [{ state: State.A }] : [{ state: State.B }] : () => { state: State.A; }[] | { state: State.B; }[]
|
||||
>!!true ? [{ state: State.A }] : [{ state: State.B }] : { state: State.A; }[] | { state: State.B; }[]
|
||||
|
||||
@@ -20,8 +20,8 @@ foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }
|
||||
>p1.length : number
|
||||
>p1 : string
|
||||
>length : number
|
||||
>{ method(p2) { return undefined } } : { method(p2: number): any; }
|
||||
>method : (p2: number) => any
|
||||
>{ method(p2) { return undefined } } : { method(p2: number): undefined; }
|
||||
>method : (p2: number) => undefined
|
||||
>p2 : number
|
||||
>undefined : undefined
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }
|
||||
>p1.length : number
|
||||
>p1 : string
|
||||
>length : number
|
||||
>{ method(p2) { return undefined } } : { method(p2: number): any; }
|
||||
>method : (p2: number) => any
|
||||
>{ method(p2) { return undefined } } : { method(p2: number): undefined; }
|
||||
>method : (p2: number) => undefined
|
||||
>p2 : number
|
||||
>undefined : undefined
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ Context.prototype = {
|
||||
>construct : (input: Input, handle?: HookHandler | undefined) => State
|
||||
>input : Input
|
||||
>handle : (arg: Context) => void
|
||||
>() => void 0 : () => any
|
||||
>() => void 0 : () => undefined
|
||||
>void 0 : undefined
|
||||
>0 : 0
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ import {B} from "./f2";
|
||||
>B : typeof B
|
||||
|
||||
A.prototype.foo = function () { return undefined; }
|
||||
>A.prototype.foo = function () { return undefined; } : () => any
|
||||
>A.prototype.foo = function () { return undefined; } : () => undefined
|
||||
>A.prototype.foo : () => B
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>foo : () => B
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./f1" {
|
||||
|
||||
@@ -15,13 +15,13 @@ import {A} from "./f1";
|
||||
>A : typeof A
|
||||
|
||||
A.prototype.foo = function () { return undefined; }
|
||||
>A.prototype.foo = function () { return undefined; } : () => any
|
||||
>A.prototype.foo = function () { return undefined; } : () => undefined
|
||||
>A.prototype.foo : () => any
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>foo : () => any
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
namespace N {
|
||||
|
||||
@@ -18,13 +18,13 @@ import {B} from "./f2";
|
||||
>B : typeof B
|
||||
|
||||
A.prototype.foo = function () { return undefined; }
|
||||
>A.prototype.foo = function () { return undefined; } : () => any
|
||||
>A.prototype.foo = function () { return undefined; } : () => undefined
|
||||
>A.prototype.foo : () => B
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>foo : () => B
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
namespace N {
|
||||
|
||||
@@ -18,13 +18,13 @@ import {B} from "./f2";
|
||||
>B : typeof B
|
||||
|
||||
A.prototype.foo = function () { return undefined; }
|
||||
>A.prototype.foo = function () { return undefined; } : () => any
|
||||
>A.prototype.foo = function () { return undefined; } : () => undefined
|
||||
>A.prototype.foo : () => B
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>foo : () => B
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
namespace N {
|
||||
|
||||
@@ -18,13 +18,13 @@ import {B} from "./f2";
|
||||
>B : typeof B
|
||||
|
||||
A.prototype.foo = function () { return undefined; }
|
||||
>A.prototype.foo = function () { return undefined; } : () => any
|
||||
>A.prototype.foo = function () { return undefined; } : () => undefined
|
||||
>A.prototype.foo : () => B
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>foo : () => B
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
export namespace N {
|
||||
|
||||
@@ -29,23 +29,23 @@ import {Cls} from "C";
|
||||
>Cls : typeof Cls
|
||||
|
||||
A.prototype.getB = function () { return undefined; }
|
||||
>A.prototype.getB = function () { return undefined; } : () => any
|
||||
>A.prototype.getB = function () { return undefined; } : () => undefined
|
||||
>A.prototype.getB : () => B
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>getB : () => B
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
A.prototype.getCls = function () { return undefined; }
|
||||
>A.prototype.getCls = function () { return undefined; } : () => any
|
||||
>A.prototype.getCls = function () { return undefined; } : () => undefined
|
||||
>A.prototype.getCls : () => Cls
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>getCls : () => Cls
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./a" {
|
||||
|
||||
@@ -26,13 +26,13 @@ import {B} from "./b";
|
||||
>B : typeof B
|
||||
|
||||
A.prototype.getB = function () { return undefined; }
|
||||
>A.prototype.getB = function () { return undefined; } : () => any
|
||||
>A.prototype.getB = function () { return undefined; } : () => undefined
|
||||
>A.prototype.getB : () => B
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>getB : () => B
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./a" {
|
||||
@@ -52,13 +52,13 @@ import {Cls} from "C";
|
||||
>Cls : typeof Cls
|
||||
|
||||
A.prototype.getCls = function () { return undefined; }
|
||||
>A.prototype.getCls = function () { return undefined; } : () => any
|
||||
>A.prototype.getCls = function () { return undefined; } : () => undefined
|
||||
>A.prototype.getCls : () => Cls
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>getCls : () => Cls
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./a" {
|
||||
|
||||
@@ -80,13 +80,13 @@ import {Cls} from "C";
|
||||
>Cls : typeof Cls
|
||||
|
||||
A.prototype.getCls = function () { return undefined; }
|
||||
>A.prototype.getCls = function () { return undefined; } : () => any
|
||||
>A.prototype.getCls = function () { return undefined; } : () => undefined
|
||||
>A.prototype.getCls : () => Cls
|
||||
>A.prototype : A
|
||||
>A : typeof A
|
||||
>prototype : A
|
||||
>getCls : () => Cls
|
||||
>function () { return undefined; } : () => any
|
||||
>function () { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./a" {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var x: (a: any) => void = function <T>(x: T) {
|
||||
>x : (a: any) => void
|
||||
>a : any
|
||||
>function <T>(x: T) { return null;} : <T>(x: T) => any
|
||||
>function <T>(x: T) { return null;} : <T>(x: T) => null
|
||||
>x : T
|
||||
|
||||
return null;
|
||||
@@ -13,8 +13,8 @@ var x: (a: any) => void = function <T>(x: T) {
|
||||
var x2: (a: any) => void = function f<T>(x: T) {
|
||||
>x2 : (a: any) => void
|
||||
>a : any
|
||||
>function f<T>(x: T) { return null;} : <T>(x: T) => any
|
||||
>f : <T>(x: T) => any
|
||||
>function f<T>(x: T) { return null;} : <T>(x: T) => null
|
||||
>f : <T>(x: T) => null
|
||||
>x : T
|
||||
|
||||
return null;
|
||||
|
||||
@@ -128,11 +128,11 @@ var h = fun((((x => x))), ((x => x)), 10);
|
||||
|
||||
// Ternaries in parens
|
||||
var i = fun((Math.random() < 0.5 ? x => x : x => undefined), 10);
|
||||
>i : any
|
||||
>fun((Math.random() < 0.5 ? x => x : x => undefined), 10) : any
|
||||
>i : number
|
||||
>fun((Math.random() < 0.5 ? x => x : x => undefined), 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? x => x : x => undefined) : (x: number) => any
|
||||
>Math.random() < 0.5 ? x => x : x => undefined : (x: number) => any
|
||||
>(Math.random() < 0.5 ? x => x : x => undefined) : (x: number) => number
|
||||
>Math.random() < 0.5 ? x => x : x => undefined : (x: number) => number
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -142,17 +142,17 @@ var i = fun((Math.random() < 0.5 ? x => x : x => undefined), 10);
|
||||
>x => x : (x: number) => number
|
||||
>x : number
|
||||
>x : number
|
||||
>x => undefined : (x: number) => any
|
||||
>x => undefined : (x: number) => undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
|
||||
var j = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10);
|
||||
>j : any
|
||||
>fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10) : any
|
||||
>j : number
|
||||
>fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : (x: number) => any
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : (x: number) => any
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : (x: number) => number
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : (x: number) => number
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -163,18 +163,18 @@ var j = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), 10);
|
||||
>x => x : (x: number) => number
|
||||
>x : number
|
||||
>x : number
|
||||
>(x => undefined) : (x: number) => any
|
||||
>x => undefined : (x: number) => any
|
||||
>(x => undefined) : (x: number) => undefined
|
||||
>x => undefined : (x: number) => undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
|
||||
var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10);
|
||||
>k : any
|
||||
>fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10) : any
|
||||
>k : number
|
||||
>fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : (x: number) => any
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : (x: number) => any
|
||||
>(Math.random() < 0.5 ? (x => x) : (x => undefined)) : (x: number) => number
|
||||
>Math.random() < 0.5 ? (x => x) : (x => undefined) : (x: number) => number
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -185,8 +185,8 @@ var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10);
|
||||
>x => x : (x: number) => number
|
||||
>x : number
|
||||
>x : number
|
||||
>(x => undefined) : (x: number) => any
|
||||
>x => undefined : (x: number) => any
|
||||
>(x => undefined) : (x: number) => undefined
|
||||
>x => undefined : (x: number) => undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>x => x : (x: number) => number
|
||||
@@ -195,12 +195,12 @@ var k = fun((Math.random() < 0.5 ? (x => x) : (x => undefined)), x => x, 10);
|
||||
>10 : 10
|
||||
|
||||
var l = fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)), 10);
|
||||
>l : any
|
||||
>fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)), 10) : any
|
||||
>l : number
|
||||
>fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)), 10) : number
|
||||
>fun : { <T>(g: (x: T) => T, x: T): T; <T>(g: (x: T) => T, h: (y: T) => T, x: T): T; }
|
||||
>((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))) : (x: number) => any
|
||||
>(Math.random() < 0.5 ? ((x => x)) : ((x => undefined))) : (x: number) => any
|
||||
>Math.random() < 0.5 ? ((x => x)) : ((x => undefined)) : (x: number) => any
|
||||
>((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))) : (x: number) => number
|
||||
>(Math.random() < 0.5 ? ((x => x)) : ((x => undefined))) : (x: number) => number
|
||||
>Math.random() < 0.5 ? ((x => x)) : ((x => undefined)) : (x: number) => number
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -212,9 +212,9 @@ var l = fun(((Math.random() < 0.5 ? ((x => x)) : ((x => undefined)))), ((x => x)
|
||||
>x => x : (x: number) => number
|
||||
>x : number
|
||||
>x : number
|
||||
>((x => undefined)) : (x: number) => any
|
||||
>(x => undefined) : (x: number) => any
|
||||
>x => undefined : (x: number) => any
|
||||
>((x => undefined)) : (x: number) => undefined
|
||||
>(x => undefined) : (x: number) => undefined
|
||||
>x => undefined : (x: number) => undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>((x => x)) : (x: number) => number
|
||||
@@ -248,16 +248,16 @@ type ObjType = { x: (p: number) => string; y: (p: string) => number };
|
||||
|
||||
var obj1: ObjType = { x: x => (x, undefined), y: y => (y, undefined) };
|
||||
>obj1 : ObjType
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => any; y: (y: string) => any; }
|
||||
>x : (x: number) => any
|
||||
>x => (x, undefined) : (x: number) => any
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => undefined; y: (y: string) => undefined; }
|
||||
>x : (x: number) => undefined
|
||||
>x => (x, undefined) : (x: number) => undefined
|
||||
>x : number
|
||||
>(x, undefined) : undefined
|
||||
>x, undefined : undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>y : (y: string) => any
|
||||
>y => (y, undefined) : (y: string) => any
|
||||
>y : (y: string) => undefined
|
||||
>y => (y, undefined) : (y: string) => undefined
|
||||
>y : string
|
||||
>(y, undefined) : undefined
|
||||
>y, undefined : undefined
|
||||
@@ -266,17 +266,17 @@ var obj1: ObjType = { x: x => (x, undefined), y: y => (y, undefined) };
|
||||
|
||||
var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) });
|
||||
>obj2 : ObjType
|
||||
>({ x: x => (x, undefined), y: y => (y, undefined) }) : { x: (x: number) => any; y: (y: string) => any; }
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => any; y: (y: string) => any; }
|
||||
>x : (x: number) => any
|
||||
>x => (x, undefined) : (x: number) => any
|
||||
>({ x: x => (x, undefined), y: y => (y, undefined) }) : { x: (x: number) => undefined; y: (y: string) => undefined; }
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => undefined; y: (y: string) => undefined; }
|
||||
>x : (x: number) => undefined
|
||||
>x => (x, undefined) : (x: number) => undefined
|
||||
>x : number
|
||||
>(x, undefined) : undefined
|
||||
>x, undefined : undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>y : (y: string) => any
|
||||
>y => (y, undefined) : (y: string) => any
|
||||
>y : (y: string) => undefined
|
||||
>y => (y, undefined) : (y: string) => undefined
|
||||
>y : string
|
||||
>(y, undefined) : undefined
|
||||
>y, undefined : undefined
|
||||
|
||||
@@ -172,8 +172,8 @@ var i = fun((Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x
|
||||
>i : number
|
||||
>fun((Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined), 10) : 10
|
||||
>fun : { <T>(f: FuncType, x: T): T; <T>(f: FuncType, g: FuncType, x: T): T; }
|
||||
>(Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined : (x: <T>(p: T) => T) => any
|
||||
>(Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x => undefined : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -186,7 +186,7 @@ var i = fun((Math.random() < 0.5 ? x => { x<number>(undefined); return x; } : x
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>x : <T>(p: T) => T
|
||||
>x => undefined : (x: <T>(p: T) => T) => any
|
||||
>x => undefined : (x: <T>(p: T) => T) => undefined
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
@@ -195,8 +195,8 @@ var j = fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) :
|
||||
>j : number
|
||||
>fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)), 10) : 10
|
||||
>fun : { <T>(f: FuncType, x: T): T; <T>(f: FuncType, g: FuncType, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -210,8 +210,8 @@ var j = fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) :
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>x : <T>(p: T) => T
|
||||
>(x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>x => undefined : (x: <T>(p: T) => T) => any
|
||||
>(x => undefined) : (x: <T>(p: T) => T) => undefined
|
||||
>x => undefined : (x: <T>(p: T) => T) => undefined
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>10 : 10
|
||||
@@ -220,8 +220,8 @@ var k = fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) :
|
||||
>k : number
|
||||
>fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)), x => { x<number>(undefined); return x; }, 10) : 10
|
||||
>fun : { <T>(f: FuncType, x: T): T; <T>(f: FuncType, g: FuncType, x: T): T; }
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>(Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined)) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) : (x => undefined) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -235,8 +235,8 @@ var k = fun((Math.random() < 0.5 ? (x => { x<number>(undefined); return x; }) :
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>x : <T>(p: T) => T
|
||||
>(x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>x => undefined : (x: <T>(p: T) => T) => any
|
||||
>(x => undefined) : (x: <T>(p: T) => T) => undefined
|
||||
>x => undefined : (x: <T>(p: T) => T) => undefined
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>x => { x<number>(undefined); return x; } : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
@@ -251,9 +251,9 @@ var l = fun(((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; }))
|
||||
>l : number
|
||||
>fun(((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)))),((x => { x<number>(undefined); return x; })), 10) : 10
|
||||
>fun : { <T>(f: FuncType, x: T): T; <T>(f: FuncType, g: FuncType, x: T): T; }
|
||||
>((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)))) : (x: <T>(p: T) => T) => any
|
||||
>(Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined))) : (x: <T>(p: T) => T) => any
|
||||
>Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)))) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>(Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined))) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; })) : ((x => undefined)) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
>Math.random() < 0.5 : boolean
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
@@ -268,9 +268,9 @@ var l = fun(((Math.random() < 0.5 ? ((x => { x<number>(undefined); return x; }))
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>x : <T>(p: T) => T
|
||||
>((x => undefined)) : (x: <T>(p: T) => T) => any
|
||||
>(x => undefined) : (x: <T>(p: T) => T) => any
|
||||
>x => undefined : (x: <T>(p: T) => T) => any
|
||||
>((x => undefined)) : (x: <T>(p: T) => T) => undefined
|
||||
>(x => undefined) : (x: <T>(p: T) => T) => undefined
|
||||
>x => undefined : (x: <T>(p: T) => T) => undefined
|
||||
>x : <T>(p: T) => T
|
||||
>undefined : undefined
|
||||
>((x => { x<number>(undefined); return x; })) : (x: <T>(p: T) => T) => <T>(p: T) => T
|
||||
@@ -311,16 +311,16 @@ type ObjType = { x: (p: number) => string; y: (p: string) => number };
|
||||
|
||||
var obj1: ObjType = { x: x => (x, undefined), y: y => (y, undefined) };
|
||||
>obj1 : ObjType
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => any; y: (y: string) => any; }
|
||||
>x : (x: number) => any
|
||||
>x => (x, undefined) : (x: number) => any
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => undefined; y: (y: string) => undefined; }
|
||||
>x : (x: number) => undefined
|
||||
>x => (x, undefined) : (x: number) => undefined
|
||||
>x : number
|
||||
>(x, undefined) : undefined
|
||||
>x, undefined : undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>y : (y: string) => any
|
||||
>y => (y, undefined) : (y: string) => any
|
||||
>y : (y: string) => undefined
|
||||
>y => (y, undefined) : (y: string) => undefined
|
||||
>y : string
|
||||
>(y, undefined) : undefined
|
||||
>y, undefined : undefined
|
||||
@@ -329,17 +329,17 @@ var obj1: ObjType = { x: x => (x, undefined), y: y => (y, undefined) };
|
||||
|
||||
var obj2: ObjType = ({ x: x => (x, undefined), y: y => (y, undefined) });
|
||||
>obj2 : ObjType
|
||||
>({ x: x => (x, undefined), y: y => (y, undefined) }) : { x: (x: number) => any; y: (y: string) => any; }
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => any; y: (y: string) => any; }
|
||||
>x : (x: number) => any
|
||||
>x => (x, undefined) : (x: number) => any
|
||||
>({ x: x => (x, undefined), y: y => (y, undefined) }) : { x: (x: number) => undefined; y: (y: string) => undefined; }
|
||||
>{ x: x => (x, undefined), y: y => (y, undefined) } : { x: (x: number) => undefined; y: (y: string) => undefined; }
|
||||
>x : (x: number) => undefined
|
||||
>x => (x, undefined) : (x: number) => undefined
|
||||
>x : number
|
||||
>(x, undefined) : undefined
|
||||
>x, undefined : undefined
|
||||
>x : number
|
||||
>undefined : undefined
|
||||
>y : (y: string) => any
|
||||
>y => (y, undefined) : (y: string) => any
|
||||
>y : (y: string) => undefined
|
||||
>y => (y, undefined) : (y: string) => undefined
|
||||
>y : string
|
||||
>(y, undefined) : undefined
|
||||
>y, undefined : undefined
|
||||
|
||||
@@ -233,7 +233,7 @@ const p14 = p.catch(() => undefined);
|
||||
>p.catch : <TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>) => Promise<boolean | TResult>
|
||||
>p : Promise<boolean>
|
||||
>catch : <TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>) => Promise<boolean | TResult>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p15 = p.catch(() => null);
|
||||
@@ -242,7 +242,7 @@ const p15 = p.catch(() => null);
|
||||
>p.catch : <TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>) => Promise<boolean | TResult>
|
||||
>p : Promise<boolean>
|
||||
>catch : <TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>) => Promise<boolean | TResult>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p16 = p.catch(() => {});
|
||||
@@ -328,7 +328,7 @@ const p24 = p.then(() => undefined);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p25 = p.then(() => null);
|
||||
@@ -337,7 +337,7 @@ const p25 = p.then(() => null);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p26 = p.then(() => {});
|
||||
@@ -428,7 +428,7 @@ const p34 = p.then(undefined, () => undefined);
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>undefined : undefined
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p35 = p.then(undefined, () => null);
|
||||
@@ -438,7 +438,7 @@ const p35 = p.then(undefined, () => null);
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>undefined : undefined
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p36 = p.then(undefined, () => {});
|
||||
@@ -533,7 +533,7 @@ const p44 = p.then(null, () => undefined);
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>null : null
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p45 = p.then(null, () => null);
|
||||
@@ -543,7 +543,7 @@ const p45 = p.then(null, () => null);
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>null : null
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p46 = p.then(null, () => {});
|
||||
@@ -643,7 +643,7 @@ const p54 = p.then(() => "1", () => undefined);
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => "1" : () => string
|
||||
>"1" : "1"
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p55 = p.then(() => "1", () => null);
|
||||
@@ -654,7 +654,7 @@ const p55 = p.then(() => "1", () => null);
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => "1" : () => string
|
||||
>"1" : "1"
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p56 = p.then(() => "1", () => {});
|
||||
@@ -758,7 +758,7 @@ const p64 = p.then(() => x, () => undefined);
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p65 = p.then(() => x, () => null);
|
||||
@@ -769,7 +769,7 @@ const p65 = p.then(() => x, () => null);
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p66 = p.then(() => x, () => {});
|
||||
@@ -829,7 +829,7 @@ const p70 = p.then(() => undefined, undefined);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>undefined : undefined
|
||||
|
||||
@@ -839,7 +839,7 @@ const p71 = p.then(() => undefined, null);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>null : null
|
||||
|
||||
@@ -849,7 +849,7 @@ const p72 = p.then(() => undefined, () => 1);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => 1 : () => number
|
||||
>1 : 1
|
||||
@@ -860,7 +860,7 @@ const p73 = p.then(() => undefined, () => x);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
@@ -871,9 +871,9 @@ const p74 = p.then(() => undefined, () => undefined);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p75 = p.then(() => undefined, () => null);
|
||||
@@ -882,9 +882,9 @@ const p75 = p.then(() => undefined, () => null);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p76 = p.then(() => undefined, () => {});
|
||||
@@ -893,7 +893,7 @@ const p76 = p.then(() => undefined, () => {});
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => {} : () => void
|
||||
|
||||
@@ -903,7 +903,7 @@ const p77 = p.then(() => undefined, () => {throw 1});
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => {throw 1} : () => never
|
||||
>1 : 1
|
||||
@@ -914,7 +914,7 @@ const p78 = p.then(() => undefined, () => Promise.resolve(1));
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => Promise.resolve(1) : () => Promise<number>
|
||||
>Promise.resolve(1) : Promise<number>
|
||||
@@ -929,7 +929,7 @@ const p79 = p.then(() => undefined, () => Promise.reject(1));
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
>() => Promise.reject(1) : () => Promise<never>
|
||||
>Promise.reject(1) : Promise<never>
|
||||
@@ -944,7 +944,7 @@ const p80 = p.then(() => null, undefined);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>undefined : undefined
|
||||
|
||||
@@ -954,7 +954,7 @@ const p81 = p.then(() => null, null);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>null : null
|
||||
|
||||
@@ -964,7 +964,7 @@ const p82 = p.then(() => null, () => 1);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => 1 : () => number
|
||||
>1 : 1
|
||||
@@ -975,7 +975,7 @@ const p83 = p.then(() => null, () => x);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
@@ -986,9 +986,9 @@ const p84 = p.then(() => null, () => undefined);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p85 = p.then(() => null, () => null);
|
||||
@@ -997,9 +997,9 @@ const p85 = p.then(() => null, () => null);
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p86 = p.then(() => null, () => {});
|
||||
@@ -1008,7 +1008,7 @@ const p86 = p.then(() => null, () => {});
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => {} : () => void
|
||||
|
||||
@@ -1018,7 +1018,7 @@ const p87 = p.then(() => null, () => {throw 1});
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => {throw 1} : () => never
|
||||
>1 : 1
|
||||
@@ -1029,7 +1029,7 @@ const p88 = p.then(() => null, () => Promise.resolve(1));
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => Promise.resolve(1) : () => Promise<number>
|
||||
>Promise.resolve(1) : Promise<number>
|
||||
@@ -1044,7 +1044,7 @@ const p89 = p.then(() => null, () => Promise.reject(1));
|
||||
>p.then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
>() => Promise.reject(1) : () => Promise<never>
|
||||
>Promise.reject(1) : Promise<never>
|
||||
@@ -1098,7 +1098,7 @@ const p94 = p.then(() => {}, () => undefined);
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => {} : () => void
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const p95 = p.then(() => {}, () => null);
|
||||
@@ -1108,7 +1108,7 @@ const p95 = p.then(() => {}, () => null);
|
||||
>p : Promise<boolean>
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => {} : () => void
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const p96 = p.then(() => {}, () => {});
|
||||
@@ -1208,7 +1208,7 @@ const pa4 = p.then(() => {throw 1}, () => undefined);
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => {throw 1} : () => never
|
||||
>1 : 1
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const pa5 = p.then(() => {throw 1}, () => null);
|
||||
@@ -1219,7 +1219,7 @@ const pa5 = p.then(() => {throw 1}, () => null);
|
||||
>then : <TResult1 = boolean, TResult2 = never>(onfulfilled?: (value: boolean) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
|
||||
>() => {throw 1} : () => never
|
||||
>1 : 1
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const pa6 = p.then(() => {throw 1}, () => {});
|
||||
@@ -1343,7 +1343,7 @@ const pb4 = p.then(() => Promise.resolve("1"), () => undefined);
|
||||
>Promise : PromiseConstructor
|
||||
>resolve : { (): Promise<void>; <T>(value: T | PromiseLike<T>): Promise<T>; }
|
||||
>"1" : "1"
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const pb5 = p.then(() => Promise.resolve("1"), () => null);
|
||||
@@ -1358,7 +1358,7 @@ const pb5 = p.then(() => Promise.resolve("1"), () => null);
|
||||
>Promise : PromiseConstructor
|
||||
>resolve : { (): Promise<void>; <T>(value: T | PromiseLike<T>): Promise<T>; }
|
||||
>"1" : "1"
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const pb6 = p.then(() => Promise.resolve("1"), () => {});
|
||||
@@ -1498,7 +1498,7 @@ const pc4 = p.then(() => Promise.reject("1"), () => undefined);
|
||||
>Promise : PromiseConstructor
|
||||
>reject : <T = never>(reason?: any) => Promise<T>
|
||||
>"1" : "1"
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
const pc5 = p.then(() => Promise.reject("1"), () => null);
|
||||
@@ -1513,7 +1513,7 @@ const pc5 = p.then(() => Promise.reject("1"), () => null);
|
||||
>Promise : PromiseConstructor
|
||||
>reject : <T = never>(reason?: any) => Promise<T>
|
||||
>"1" : "1"
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
const pc6 = p.then(() => Promise.reject("1"), () => {});
|
||||
|
||||
@@ -8,7 +8,7 @@ function f(...x: number[]) {
|
||||
>x.forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void
|
||||
>x : number[]
|
||||
>forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void
|
||||
>(n, i) => void ('item ' + i + ' = ' + n) : (n: number, i: number) => any
|
||||
>(n, i) => void ('item ' + i + ' = ' + n) : (n: number, i: number) => undefined
|
||||
>n : number
|
||||
>i : number
|
||||
>void ('item ' + i + ' = ' + n) : undefined
|
||||
|
||||
@@ -90,7 +90,7 @@ someGenerics3 `${() => undefined}`;
|
||||
>someGenerics3 `${() => undefined}` : void
|
||||
>someGenerics3 : <T>(strs: TemplateStringsArray, producer: () => T) => void
|
||||
>`${() => undefined}` : string
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
someGenerics3 `${() => 3}`;
|
||||
@@ -113,7 +113,7 @@ someGenerics4 `${4}${ () => null }`;
|
||||
>someGenerics4 : <T, U>(strs: TemplateStringsArray, n: T, f: (x: U) => void) => void
|
||||
>`${4}${ () => null }` : string
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics4 `${''}${ () => 3 }`;
|
||||
@@ -144,7 +144,7 @@ someGenerics5 `${ 4 } ${ () => null }`;
|
||||
>someGenerics5 : <U, T>(strs: TemplateStringsArray, n: T, f: (x: U) => void) => void
|
||||
>`${ 4 } ${ () => null }` : string
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics5 `${ '' }${ () => 3 }`;
|
||||
|
||||
@@ -90,7 +90,7 @@ someGenerics3 `${() => undefined}`;
|
||||
>someGenerics3 `${() => undefined}` : void
|
||||
>someGenerics3 : <T>(strs: TemplateStringsArray, producer: () => T) => void
|
||||
>`${() => undefined}` : string
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
someGenerics3 `${() => 3}`;
|
||||
@@ -113,7 +113,7 @@ someGenerics4 `${4}${ () => null }`;
|
||||
>someGenerics4 : <T, U>(strs: TemplateStringsArray, n: T, f: (x: U) => void) => void
|
||||
>`${4}${ () => null }` : string
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics4 `${''}${ () => 3 }`;
|
||||
@@ -144,7 +144,7 @@ someGenerics5 `${ 4 } ${ () => null }`;
|
||||
>someGenerics5 : <U, T>(strs: TemplateStringsArray, n: T, f: (x: U) => void) => void
|
||||
>`${ 4 } ${ () => null }` : string
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics5 `${ '' }${ () => 3 }`;
|
||||
|
||||
@@ -134,7 +134,7 @@ someGenerics3(() => '');
|
||||
someGenerics3<Date>(() => undefined);
|
||||
>someGenerics3<Date>(() => undefined) : void
|
||||
>someGenerics3 : <T>(producer: () => T) => void
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
someGenerics3<number>(() => 3);
|
||||
@@ -154,7 +154,7 @@ someGenerics4(4, () => null);
|
||||
>someGenerics4(4, () => null) : void
|
||||
>someGenerics4 : <T, U>(n: T, f: (x: U) => void) => void
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics4<string, number>('', () => 3);
|
||||
@@ -181,7 +181,7 @@ someGenerics5(4, () => null);
|
||||
>someGenerics5(4, () => null) : void
|
||||
>someGenerics5 : <U, T>(n: T, f: (x: U) => void) => void
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics5<number, string>('', () => 3);
|
||||
|
||||
@@ -158,7 +158,7 @@ new someGenerics3(() => '');
|
||||
new someGenerics3<Window>(() => undefined);
|
||||
>new someGenerics3<Window>(() => undefined) : any
|
||||
>someGenerics3 : someGenerics3
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
new someGenerics3<number>(() => 3);
|
||||
@@ -181,7 +181,7 @@ new someGenerics4(4, () => null);
|
||||
>new someGenerics4(4, () => null) : any
|
||||
>someGenerics4 : someGenerics4
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
new someGenerics4<string, number>('', () => 3);
|
||||
@@ -219,7 +219,7 @@ new someGenerics5(4, () => null);
|
||||
>new someGenerics5(4, () => null) : any
|
||||
>someGenerics5 : someGenerics5
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
new someGenerics5<number, string>('', () => 3);
|
||||
|
||||
@@ -146,7 +146,7 @@ someGenerics3(() => ''); // Error
|
||||
someGenerics3<Window>(() => undefined);
|
||||
>someGenerics3<Window>(() => undefined) : void
|
||||
>someGenerics3 : <T extends Window>(producer: () => T) => void
|
||||
>() => undefined : () => any
|
||||
>() => undefined : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
someGenerics3<number>(() => 3); // Error
|
||||
@@ -166,7 +166,7 @@ someGenerics4(4, () => null); // Valid
|
||||
>someGenerics4(4, () => null) : void
|
||||
>someGenerics4 : <T, U extends number>(n: T, f: (x: U) => void) => void
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics4<string, number>('', () => 3);
|
||||
@@ -201,7 +201,7 @@ someGenerics5(4, () => null); // Valid
|
||||
>someGenerics5(4, () => null) : void
|
||||
>someGenerics5 : <U extends number, T>(n: T, f: (x: U) => void) => void
|
||||
>4 : 4
|
||||
>() => null : () => any
|
||||
>() => null : () => null
|
||||
>null : null
|
||||
|
||||
someGenerics5<number, string>('', () => 3);
|
||||
|
||||
@@ -25,10 +25,10 @@ foo.foo({ bar: null }, bar => null, bar => null);
|
||||
>{ bar: null } : { bar: null; }
|
||||
>bar : null
|
||||
>null : null
|
||||
>bar => null : (bar: { bar: any; }) => any
|
||||
>bar => null : (bar: { bar: any; }) => null
|
||||
>bar : { bar: any; }
|
||||
>null : null
|
||||
>bar => null : (bar: { bar: any; }) => any
|
||||
>bar => null : (bar: { bar: any; }) => null
|
||||
>bar : { bar: any; }
|
||||
>null : null
|
||||
|
||||
|
||||
@@ -42,13 +42,13 @@ import {Cls} from "./main";
|
||||
>Cls : typeof Cls
|
||||
|
||||
Cls.prototype.foo = function() { return undefined; }
|
||||
>Cls.prototype.foo = function() { return undefined; } : () => any
|
||||
>Cls.prototype.foo = function() { return undefined; } : () => undefined
|
||||
>Cls.prototype.foo : () => Lib
|
||||
>Cls.prototype : Cls
|
||||
>Cls : typeof Cls
|
||||
>prototype : Cls
|
||||
>foo : () => Lib
|
||||
>function() { return undefined; } : () => any
|
||||
>function() { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./main" {
|
||||
|
||||
@@ -42,13 +42,13 @@ import {Cls} from "./main";
|
||||
>Cls : typeof Cls
|
||||
|
||||
Cls.prototype.foo = function() { return undefined; }
|
||||
>Cls.prototype.foo = function() { return undefined; } : () => any
|
||||
>Cls.prototype.foo = function() { return undefined; } : () => undefined
|
||||
>Cls.prototype.foo : () => Lib
|
||||
>Cls.prototype : Cls
|
||||
>Cls : typeof Cls
|
||||
>prototype : Cls
|
||||
>foo : () => Lib
|
||||
>function() { return undefined; } : () => any
|
||||
>function() { return undefined; } : () => undefined
|
||||
>undefined : undefined
|
||||
|
||||
declare module "./main" {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/types/tuple/wideningTuples2.ts(2,9): error TS7005: Variable 'intermediate' implicitly has an '[any]' type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/tuple/wideningTuples2.ts (1 errors) ====
|
||||
var foo: () => [any] = function bar() {
|
||||
let intermediate = bar();
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS7005: Variable 'intermediate' implicitly has an '[any]' type.
|
||||
intermediate = [""];
|
||||
return [undefined];
|
||||
};
|
||||
@@ -1,13 +1,13 @@
|
||||
=== tests/cases/conformance/types/tuple/wideningTuples2.ts ===
|
||||
var foo: () => [any] = function bar() {
|
||||
>foo : () => [any]
|
||||
>function bar() { let intermediate = bar(); intermediate = [""]; return [undefined];} : () => [any]
|
||||
>bar : () => [any]
|
||||
>function bar() { let intermediate = bar(); intermediate = [""]; return [undefined];} : () => [undefined]
|
||||
>bar : () => [undefined]
|
||||
|
||||
let intermediate = bar();
|
||||
>intermediate : [any]
|
||||
>bar() : [any]
|
||||
>bar : () => [any]
|
||||
>bar() : [undefined]
|
||||
>bar : () => [undefined]
|
||||
|
||||
intermediate = [""];
|
||||
>intermediate = [""] : [string]
|
||||
|
||||
Reference in New Issue
Block a user