diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types index 0dfc19dea0665..34c399156fd78 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignatures2.types @@ -32,8 +32,8 @@ var a: { new(x: Date): string } >x : Date var b = { new(x: RegExp) { return ''; } }; // not a construct signature, function called new ->b : { new(x: RegExp): string; } ->{ new(x: RegExp) { return ''; } } : { new(x: RegExp): string; } +>b : { "new"(x: RegExp): string; } +>{ new(x: RegExp) { return ''; } } : { "new"(x: RegExp): string; } >new : (x: RegExp) => string >x : RegExp >'' : "" @@ -89,17 +89,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: RegExp): string; }): any; } ->x : { new(x: RegExp): string; } ->b : { new(x: RegExp): string; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: RegExp): string; }): any; } +>x : { "new"(x: RegExp): string; } +>b : { "new"(x: RegExp): string; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: RegExp): string; }): any; (x: typeof b): any; } ->x : { new(x: RegExp): string; } ->b : { new(x: RegExp): string; } +>foo4 : { (x: { "new"(x: RegExp): string; }): any; (x: typeof b): any; } +>x : { "new"(x: RegExp): string; } +>b : { "new"(x: RegExp): string; } function foo4(x: any) { } ->foo4 : { (x: { new(x: RegExp): string; }): any; (x: { new(x: RegExp): string; }): any; } +>foo4 : { (x: { "new"(x: RegExp): string; }): any; (x: { "new"(x: RegExp): string; }): any; } >x : any function foo8(x: B); @@ -140,16 +140,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: RegExp): string; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: RegExp): string; } ->b : { new(x: RegExp): string; } +>x : { "new"(x: RegExp): string; } +>b : { "new"(x: RegExp): string; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: RegExp): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: RegExp): string; }): any; } >x : any function foo12(x: I); @@ -190,16 +190,16 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: RegExp): string; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: RegExp): string; } ->b : { new(x: RegExp): string; } +>x : { "new"(x: RegExp): string; } +>b : { "new"(x: RegExp): string; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: RegExp): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: RegExp): string; }): any; } >x : any function foo15(x: I2); diff --git a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types index d77dd7fb06a90..bd1c494205e8c 100644 --- a/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.types @@ -35,8 +35,8 @@ var a: { new(x: string, y: string): string } >y : string var b = { new(x: string) { return ''; } }; // not a construct signature, function called new ->b : { new(x: string): string; } ->{ new(x: string) { return ''; } } : { new(x: string): string; } +>b : { "new"(x: string): string; } +>{ new(x: string) { return ''; } } : { "new"(x: string): string; } >new : (x: string) => string >x : string >'' : "" @@ -92,17 +92,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: string): string; }): any; } ->x : { new(x: string): string; } ->b : { new(x: string): string; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: string): string; }): any; } +>x : { "new"(x: string): string; } +>b : { "new"(x: string): string; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: string): string; }): any; (x: typeof b): any; } ->x : { new(x: string): string; } ->b : { new(x: string): string; } +>foo4 : { (x: { "new"(x: string): string; }): any; (x: typeof b): any; } +>x : { "new"(x: string): string; } +>b : { "new"(x: string): string; } function foo4(x: any) { } ->foo4 : { (x: { new(x: string): string; }): any; (x: { new(x: string): string; }): any; } +>foo4 : { (x: { "new"(x: string): string; }): any; (x: { "new"(x: string): string; }): any; } >x : any function foo8(x: B); @@ -143,16 +143,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: string): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: string): string; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: string): string; } ->b : { new(x: string): string; } +>x : { "new"(x: string): string; } +>b : { "new"(x: string): string; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: string): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: string): string; }): any; } >x : any function foo12(x: I); @@ -193,16 +193,16 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: string): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: string): string; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: string): string; } ->b : { new(x: string): string; } +>x : { "new"(x: string): string; } +>b : { "new"(x: string): string; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: string): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: string): string; }): any; } >x : any function foo15(x: I2); diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types index 0f0ef8d5d02ee..de2e1e509a695 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.types @@ -34,8 +34,8 @@ var a: { new>(x: T): string } >x : T var b = { new(x: T) { return ''; } }; // not a construct signature, function called new ->b : { new(x: T): string; } ->{ new(x: T) { return ''; } } : { new(x: T): string; } +>b : { "new"(x: T): string; } +>{ new(x: T) { return ''; } } : { "new"(x: T): string; } >new : (x: T) => string >x : T >'' : "" @@ -91,17 +91,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T): string; }): any; } ->x : { new(x: T): string; } ->b : { new(x: T): string; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T): string; }): any; } +>x : { "new"(x: T): string; } +>b : { "new"(x: T): string; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T): string; }): any; (x: typeof b): any; } ->x : { new(x: T): string; } ->b : { new(x: T): string; } +>foo4 : { (x: { "new"(x: T): string; }): any; (x: typeof b): any; } +>x : { "new"(x: T): string; } +>b : { "new"(x: T): string; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T): string; }): any; (x: { new(x: T): string; }): any; } +>foo4 : { (x: { "new"(x: T): string; }): any; (x: { "new"(x: T): string; }): any; } >x : any function foo8(x: B>); @@ -142,16 +142,16 @@ function foo10(x: any) { } >x : any function foo11(x: B>); ->foo11 : { (x: B>): any; (x: { new(x: T): string; }): any; } +>foo11 : { (x: B>): any; (x: { "new"(x: T): string; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T): string; } ->b : { new(x: T): string; } +>x : { "new"(x: T): string; } +>b : { "new"(x: T): string; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T): string; }): any; } >x : any function foo12(x: I); @@ -192,15 +192,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T): string; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T): string; } ->b : { new(x: T): string; } +>x : { "new"(x: T): string; } +>b : { "new"(x: T): string; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T): string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types index 32ccfc172bf7e..f356abc56a9f7 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.types @@ -47,8 +47,8 @@ var a: { new>(x: T, y: U): string } >y : U var b = { new(x: T, y: U) { return ''; } }; // not a construct signature, function called new ->b : { new(x: T, y: U): string; } ->{ new(x: T, y: U) { return ''; } } : { new(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } +>{ new(x: T, y: U) { return ''; } } : { "new"(x: T, y: U): string; } >new : (x: T, y: U) => string >x : T >y : U @@ -105,17 +105,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T, y: U): string; }): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T, y: U): string; }): any; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T, y: U): string; }): any; (x: typeof b): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>foo4 : { (x: { "new"(x: T, y: U): string; }): any; (x: typeof b): any; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T, y: U): string; }): any; (x: { new(x: T, y: U): string; }): any; } +>foo4 : { (x: { "new"(x: T, y: U): string; }): any; (x: { "new"(x: T, y: U): string; }): any; } >x : any function foo5c(x: C); @@ -180,16 +180,16 @@ function foo10(x: any) { } >x : any function foo11(x: B, Array>); ->foo11 : { (x: B, Array>): any; (x: { new(x: T, y: U): string; }): any; } +>foo11 : { (x: B, Array>): any; (x: { "new"(x: T, y: U): string; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T, y: U): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y: U): string; }): any; } >x : any function foo12(x: I); @@ -230,15 +230,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T, y: U): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y: U): string; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T, y: U): string; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y: U): string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types index bf97ae6b02c1b..02e645c133426 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.types @@ -67,8 +67,8 @@ var a: { new(x: T, y: U): string } >y : U var b = { new(x: T, y: U) { return ''; } }; // not a construct signature, function called new ->b : { new(x: T, y: U): string; } ->{ new(x: T, y: U) { return ''; } } : { new(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } +>{ new(x: T, y: U) { return ''; } } : { "new"(x: T, y: U): string; } >new : (x: T, y: U) => string >x : T >y : U @@ -125,17 +125,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T, y: U): string; }): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T, y: U): string; }): any; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T, y: U): string; }): any; (x: typeof b): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>foo4 : { (x: { "new"(x: T, y: U): string; }): any; (x: typeof b): any; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T, y: U): string; }): any; (x: { new(x: T, y: U): string; }): any; } +>foo4 : { (x: { "new"(x: T, y: U): string; }): any; (x: { "new"(x: T, y: U): string; }): any; } >x : any function foo5c(x: C); @@ -200,16 +200,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: T, y: U): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y: U): string; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T, y: U): string; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y: U): string; }): any; } >x : any function foo12(x: I, Five>); @@ -250,15 +250,15 @@ function foo13(x: any) { } >x : any function foo14(x: I, Five>); ->foo14 : { (x: I, Five>): any; (x: { new(x: T, y: U): string; }): any; } +>foo14 : { (x: I, Five>): any; (x: { "new"(x: T, y: U): string; }): any; } >x : I, Five> function foo14(x: typeof b); // ok >foo14 : { (x: I, Five>): any; (x: typeof b): any; } ->x : { new(x: T, y: U): string; } ->b : { new(x: T, y: U): string; } +>x : { "new"(x: T, y: U): string; } +>b : { "new"(x: T, y: U): string; } function foo14(x: any) { } ->foo14 : { (x: I, Five>): any; (x: { new(x: T, y: U): string; }): any; } +>foo14 : { (x: I, Five>): any; (x: { "new"(x: T, y: U): string; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types index 6c35b07b35179..6fae02bf0cd03 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.types @@ -34,8 +34,8 @@ var a: { new(x: T): T } >x : T var b = { new(x: T): T { return null; } }; // not a construct signature, function called new ->b : { new(x: T): T; } ->{ new(x: T): T { return null; } } : { new(x: T): T; } +>b : { "new"(x: T): T; } +>{ new(x: T): T { return null; } } : { "new"(x: T): T; } >new : (x: T) => T >x : T @@ -90,31 +90,31 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T): T; }): any; } ->x : { new(x: T): T; } ->b : { new(x: T): T; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T): T; }): any; } +>x : { "new"(x: T): T; } +>b : { "new"(x: T): T; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T): T; }): any; (x: typeof b): any; } ->x : { new(x: T): T; } ->b : { new(x: T): T; } +>foo4 : { (x: { "new"(x: T): T; }): any; (x: typeof b): any; } +>x : { "new"(x: T): T; } +>b : { "new"(x: T): T; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T): T; }): any; (x: { new(x: T): T; }): any; } +>foo4 : { (x: { "new"(x: T): T; }): any; (x: { "new"(x: T): T; }): any; } >x : any function foo5(x: typeof a): number; ->foo5 : { (x: typeof a): number; (x: { new(x: T): T; }): string; } +>foo5 : { (x: typeof a): number; (x: { "new"(x: T): T; }): string; } >x : new (x: T) => T >a : new (x: T) => T function foo5(x: typeof b): string; // ok >foo5 : { (x: new (x: T) => T): number; (x: typeof b): string; } ->x : { new(x: T): T; } ->b : { new(x: T): T; } +>x : { "new"(x: T): T; } +>b : { "new"(x: T): T; } function foo5(x: any): any { } ->foo5 : { (x: new (x: T) => T): number; (x: { new(x: T): T; }): string; } +>foo5 : { (x: new (x: T) => T): number; (x: { "new"(x: T): T; }): string; } >x : any function foo8(x: B); @@ -155,16 +155,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: T): T; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T): T; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T): T; } ->b : { new(x: T): T; } +>x : { "new"(x: T): T; } +>b : { "new"(x: T): T; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T): T; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T): T; }): any; } >x : any function foo12(x: I); @@ -205,16 +205,16 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T): T; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T): T; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T): T; } ->b : { new(x: T): T; } +>x : { "new"(x: T): T; } +>b : { "new"(x: T): T; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T): T; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T): T; }): any; } >x : any function foo15(x: I2); diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types index 1d95296be6e2c..09002456b70ee 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.types @@ -34,8 +34,8 @@ var a: { new(x: T): T } >x : T var b = { new(x: T) { return null; } }; // not a construct signature, function called new ->b : { new(x: T): any; } ->{ new(x: T) { return null; } } : { new(x: T): any; } +>b : { "new"(x: T): any; } +>{ new(x: T) { return null; } } : { "new"(x: T): any; } >new : (x: T) => any >x : T @@ -90,17 +90,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T): any; }): any; } ->x : { new(x: T): any; } ->b : { new(x: T): any; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T): any; }): any; } +>x : { "new"(x: T): any; } +>b : { "new"(x: T): any; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T): any; }): any; (x: typeof b): any; } ->x : { new(x: T): any; } ->b : { new(x: T): any; } +>foo4 : { (x: { "new"(x: T): any; }): any; (x: typeof b): any; } +>x : { "new"(x: T): any; } +>b : { "new"(x: T): any; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T): any; }): any; (x: { new(x: T): any; }): any; } +>foo4 : { (x: { "new"(x: T): any; }): any; (x: { "new"(x: T): any; }): any; } >x : any function foo8(x: B); @@ -141,16 +141,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: T): any; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T): any; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T): any; } ->b : { new(x: T): any; } +>x : { "new"(x: T): any; } +>b : { "new"(x: T): any; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T): any; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T): any; }): any; } >x : any function foo12(x: I); @@ -191,16 +191,16 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T): any; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T): any; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T): any; } ->b : { new(x: T): any; } +>x : { "new"(x: T): any; } +>b : { "new"(x: T): any; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T): any; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T): any; }): any; } >x : any function foo15(x: I2); diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types index a498c166bc9bf..477e469cc1482 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.types @@ -32,8 +32,8 @@ var a: { new (x: Z): C; } >x : Z var b = { new(x: A) { return x; } }; ->b : { new(x: A): A; } ->{ new(x: A) { return x; } } : { new(x: A): A; } +>b : { "new"(x: A): A; } +>{ new(x: A) { return x; } } : { "new"(x: A): A; } >new : (x: A) => A >x : A >x : A @@ -89,17 +89,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: A): A; }): any; } ->x : { new(x: A): A; } ->b : { new(x: A): A; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: A): A; }): any; } +>x : { "new"(x: A): A; } +>b : { "new"(x: A): A; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: A): A; }): any; (x: typeof b): any; } ->x : { new(x: A): A; } ->b : { new(x: A): A; } +>foo4 : { (x: { "new"(x: A): A; }): any; (x: typeof b): any; } +>x : { "new"(x: A): A; } +>b : { "new"(x: A): A; } function foo4(x: any) { } ->foo4 : { (x: { new(x: A): A; }): any; (x: { new(x: A): A; }): any; } +>foo4 : { (x: { "new"(x: A): A; }): any; (x: { "new"(x: A): A; }): any; } >x : any function foo8(x: B); @@ -140,16 +140,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: A): A; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: A): A; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: A): A; } ->b : { new(x: A): A; } +>x : { "new"(x: A): A; } +>b : { "new"(x: A): A; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: A): A; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: A): A; }): any; } >x : any function foo12(x: I, number, Date, string>); @@ -190,15 +190,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: A): A; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: A): A; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: A): A; } ->b : { new(x: A): A; } +>x : { "new"(x: A): A; } +>b : { "new"(x: A): A; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: A): A; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: A): A; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types index 9e5e401ce5ac3..64b2d8ca3795f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.types @@ -32,8 +32,8 @@ var a: { new(x: Z): B } >x : Z var b = { new(x: A) { return new C(x); } }; ->b : { new(x: A): C; } ->{ new(x: A) { return new C(x); } } : { new(x: A): C; } +>b : { "new"(x: A): C; } +>{ new(x: A) { return new C(x); } } : { "new"(x: A): C; } >new : (x: A) => C >x : A >new C(x) : C @@ -91,17 +91,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: A): C; }): any; } ->x : { new(x: A): C; } ->b : { new(x: A): C; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: A): C; }): any; } +>x : { "new"(x: A): C; } +>b : { "new"(x: A): C; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: A): C; }): any; (x: typeof b): any; } ->x : { new(x: A): C; } ->b : { new(x: A): C; } +>foo4 : { (x: { "new"(x: A): C; }): any; (x: typeof b): any; } +>x : { "new"(x: A): C; } +>b : { "new"(x: A): C; } function foo4(x: any) { } ->foo4 : { (x: { new(x: A): C; }): any; (x: { new(x: A): C; }): any; } +>foo4 : { (x: { "new"(x: A): C; }): any; (x: { "new"(x: A): C; }): any; } >x : any function foo8(x: B); @@ -142,16 +142,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: A): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: A): C; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: A): C; } ->b : { new(x: A): C; } +>x : { "new"(x: A): C; } +>b : { "new"(x: A): C; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: A): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: A): C; }): any; } >x : any function foo12(x: I); @@ -192,15 +192,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: A): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: A): C; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: A): C; } ->b : { new(x: A): C; } +>x : { "new"(x: A): C; } +>b : { "new"(x: A): C; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: A): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: A): C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types index 2fc3493fae3b1..f07a9f58d6e9f 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.types @@ -39,8 +39,8 @@ var a: { new(x: T, y?: T): B } >y : T var b = { new(x: T, y?: T) { return new C(x, y); } }; // not a construct signature, function called new ->b : { new(x: T, y?: T): C; } ->{ new(x: T, y?: T) { return new C(x, y); } } : { new(x: T, y?: T): C; } +>b : { "new"(x: T, y?: T): C; } +>{ new(x: T, y?: T) { return new C(x, y); } } : { "new"(x: T, y?: T): C; } >new : (x: T, y?: T) => C >x : T >y : T @@ -100,17 +100,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T, y?: T): C; }): any; } ->x : { new(x: T, y?: T): C; } ->b : { new(x: T, y?: T): C; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T, y?: T): C; }): any; } +>x : { "new"(x: T, y?: T): C; } +>b : { "new"(x: T, y?: T): C; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T, y?: T): C; }): any; (x: typeof b): any; } ->x : { new(x: T, y?: T): C; } ->b : { new(x: T, y?: T): C; } +>foo4 : { (x: { "new"(x: T, y?: T): C; }): any; (x: typeof b): any; } +>x : { "new"(x: T, y?: T): C; } +>b : { "new"(x: T, y?: T): C; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T, y?: T): C; }): any; (x: { new(x: T, y?: T): C; }): any; } +>foo4 : { (x: { "new"(x: T, y?: T): C; }): any; (x: { "new"(x: T, y?: T): C; }): any; } >x : any function foo8(x: B): string; @@ -151,16 +151,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: T, y?: T): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y?: T): C; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T, y?: T): C; } ->b : { new(x: T, y?: T): C; } +>x : { "new"(x: T, y?: T): C; } +>b : { "new"(x: T, y?: T): C; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T, y?: T): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y?: T): C; }): any; } >x : any function foo12(x: I); @@ -201,15 +201,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T, y?: T): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y?: T): C; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T, y?: T): C; } ->b : { new(x: T, y?: T): C; } +>x : { "new"(x: T, y?: T): C; } +>b : { "new"(x: T, y?: T): C; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T, y?: T): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y?: T): C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types index f629ad0673838..79967629250e4 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.types @@ -39,8 +39,8 @@ var a: { new(x: T, y?: U): B } >y : U var b = { new(x: T, y?: U) { return new C(x, y); } }; // not a construct signature, function called new ->b : { new(x: T, y?: U): C; } ->{ new(x: T, y?: U) { return new C(x, y); } } : { new(x: T, y?: U): C; } +>b : { "new"(x: T, y?: U): C; } +>{ new(x: T, y?: U) { return new C(x, y); } } : { "new"(x: T, y?: U): C; } >new : (x: T, y?: U) => C >x : T >y : U @@ -100,17 +100,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T, y?: U): C; }): any; } ->x : { new(x: T, y?: U): C; } ->b : { new(x: T, y?: U): C; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T, y?: U): C; }): any; } +>x : { "new"(x: T, y?: U): C; } +>b : { "new"(x: T, y?: U): C; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T, y?: U): C; }): any; (x: typeof b): any; } ->x : { new(x: T, y?: U): C; } ->b : { new(x: T, y?: U): C; } +>foo4 : { (x: { "new"(x: T, y?: U): C; }): any; (x: typeof b): any; } +>x : { "new"(x: T, y?: U): C; } +>b : { "new"(x: T, y?: U): C; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T, y?: U): C; }): any; (x: { new(x: T, y?: U): C; }): any; } +>foo4 : { (x: { "new"(x: T, y?: U): C; }): any; (x: { "new"(x: T, y?: U): C; }): any; } >x : any function foo8(x: B); @@ -151,16 +151,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: T, y?: U): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y?: U): C; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T, y?: U): C; } ->b : { new(x: T, y?: U): C; } +>x : { "new"(x: T, y?: U): C; } +>b : { "new"(x: T, y?: U): C; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T, y?: U): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y?: U): C; }): any; } >x : any function foo12(x: I); @@ -201,15 +201,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T, y?: U): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y?: U): C; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T, y?: U): C; } ->b : { new(x: T, y?: U): C; } +>x : { "new"(x: T, y?: U): C; } +>b : { "new"(x: T, y?: U): C; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T, y?: U): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y?: U): C; }): any; } >x : any diff --git a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types index 5917ef0e0ae11..9d1c287e6e356 100644 --- a/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types +++ b/tests/baselines/reference/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.types @@ -39,8 +39,8 @@ var a: { new (x: T, y?: U): B }; >y : U var b = { new(x: T, y: U) { return new C(x, y); } }; // not a construct signature, function called new ->b : { new(x: T, y: U): C; } ->{ new(x: T, y: U) { return new C(x, y); } } : { new(x: T, y: U): C; } +>b : { "new"(x: T, y: U): C; } +>{ new(x: T, y: U) { return new C(x, y); } } : { "new"(x: T, y: U): C; } >new : (x: T, y: U) => C >x : T >y : U @@ -100,17 +100,17 @@ function foo3(x: any) { } >x : any function foo4(x: typeof b); ->foo4 : { (x: typeof b): any; (x: { new(x: T, y: U): C; }): any; } ->x : { new(x: T, y: U): C; } ->b : { new(x: T, y: U): C; } +>foo4 : { (x: typeof b): any; (x: { "new"(x: T, y: U): C; }): any; } +>x : { "new"(x: T, y: U): C; } +>b : { "new"(x: T, y: U): C; } function foo4(x: typeof b); // error ->foo4 : { (x: { new(x: T, y: U): C; }): any; (x: typeof b): any; } ->x : { new(x: T, y: U): C; } ->b : { new(x: T, y: U): C; } +>foo4 : { (x: { "new"(x: T, y: U): C; }): any; (x: typeof b): any; } +>x : { "new"(x: T, y: U): C; } +>b : { "new"(x: T, y: U): C; } function foo4(x: any) { } ->foo4 : { (x: { new(x: T, y: U): C; }): any; (x: { new(x: T, y: U): C; }): any; } +>foo4 : { (x: { "new"(x: T, y: U): C; }): any; (x: { "new"(x: T, y: U): C; }): any; } >x : any function foo8(x: B); @@ -151,16 +151,16 @@ function foo10(x: any) { } >x : any function foo11(x: B); ->foo11 : { (x: B): any; (x: { new(x: T, y: U): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y: U): C; }): any; } >x : B function foo11(x: typeof b); // ok >foo11 : { (x: B): any; (x: typeof b): any; } ->x : { new(x: T, y: U): C; } ->b : { new(x: T, y: U): C; } +>x : { "new"(x: T, y: U): C; } +>b : { "new"(x: T, y: U): C; } function foo11(x: any) { } ->foo11 : { (x: B): any; (x: { new(x: T, y: U): C; }): any; } +>foo11 : { (x: B): any; (x: { "new"(x: T, y: U): C; }): any; } >x : any function foo12(x: I); @@ -201,15 +201,15 @@ function foo13(x: any) { } >x : any function foo14(x: I); ->foo14 : { (x: I): any; (x: { new(x: T, y: U): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y: U): C; }): any; } >x : I function foo14(x: typeof b); // ok >foo14 : { (x: I): any; (x: typeof b): any; } ->x : { new(x: T, y: U): C; } ->b : { new(x: T, y: U): C; } +>x : { "new"(x: T, y: U): C; } +>b : { "new"(x: T, y: U): C; } function foo14(x: any) { } ->foo14 : { (x: I): any; (x: { new(x: T, y: U): C; }): any; } +>foo14 : { (x: I): any; (x: { "new"(x: T, y: U): C; }): any; } >x : any diff --git a/tests/baselines/reference/parser645484.types b/tests/baselines/reference/parser645484.types index 290fb19fcc9f8..7dcf7f95eca7b 100644 --- a/tests/baselines/reference/parser645484.types +++ b/tests/baselines/reference/parser645484.types @@ -2,7 +2,7 @@ === parser645484.ts === var c : { ->c : { new?(): any; } +>c : { "new"?(): any; } new?(): any; >new : () => any diff --git a/tests/baselines/reference/vardecl.js b/tests/baselines/reference/vardecl.js index 1356ade167d92..77fbc628e8483 100644 --- a/tests/baselines/reference/vardecl.js +++ b/tests/baselines/reference/vardecl.js @@ -194,7 +194,7 @@ declare var n1: { [s: string]: number; }; declare var c: { - new?(): any; + "new"?(): any; }; declare var d: { foo?(): { diff --git a/tests/baselines/reference/vardecl.types b/tests/baselines/reference/vardecl.types index 39ed0dbee7492..1703a6fed1d9a 100644 --- a/tests/baselines/reference/vardecl.types +++ b/tests/baselines/reference/vardecl.types @@ -66,7 +66,7 @@ var n1: { [s: string]: number; }; >s : string var c : { ->c : { new?(): any; } +>c : { "new"?(): any; } new? (): any; >new : () => any