diff --git a/tests/baselines/reference/2dArrays.types b/tests/baselines/reference/2dArrays.types index 00805899294..0d1245e8f20 100644 --- a/tests/baselines/reference/2dArrays.types +++ b/tests/baselines/reference/2dArrays.types @@ -26,11 +26,11 @@ class Board { return this.ships.every(function (val) { return val.isSunk; }); >this.ships.every(function (val) { return val.isSunk; }) : boolean ->this.ships.every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean +>this.ships.every : (this: readonly, callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean >this.ships : Ship[] >this : this >ships : Ship[] ->every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean >function (val) { return val.isSunk; } : (val: Ship) => boolean >val : Ship >val.isSunk : boolean diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.types b/tests/baselines/reference/anyInferenceAnonymousFunctions.types index 8dc7fdcb90f..778ad76c378 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.types +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.types @@ -4,9 +4,9 @@ var paired: any[]; paired.reduce(function (a1, a2) { >paired.reduce(function (a1, a2) { return a1.concat({});} , []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >function (a1, a2) { return a1.concat({});} : (a1: any, a2: any) => any >a1 : any >a2 : any @@ -23,9 +23,9 @@ paired.reduce(function (a1, a2) { paired.reduce((b1, b2) => { >paired.reduce((b1, b2) => { return b1.concat({});} , []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(b1, b2) => { return b1.concat({});} : (b1: any, b2: any) => any >b1 : any >b2 : any @@ -42,9 +42,9 @@ paired.reduce((b1, b2) => { paired.reduce((b3, b4) => b3.concat({}), []); >paired.reduce((b3, b4) => b3.concat({}), []) : any ->paired.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>paired.reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >paired : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >(b3, b4) => b3.concat({}) : (b3: any, b4: any) => any >b3 : any >b4 : any @@ -57,9 +57,9 @@ paired.reduce((b3, b4) => b3.concat({}), []); paired.map((c1) => c1.count); >paired.map((c1) => c1.count) : any[] ->paired.map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>paired.map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >paired : any[] ->map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >(c1) => c1.count : (c1: any) => any >c1 : any >c1.count : any @@ -68,9 +68,9 @@ paired.map((c1) => c1.count); paired.map(function (c2) { return c2.count; }); >paired.map(function (c2) { return c2.count; }) : any[] ->paired.map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>paired.map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >paired : any[] ->map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >function (c2) { return c2.count; } : (c2: any) => any >c2 : any >c2.count : any diff --git a/tests/baselines/reference/argumentsAsPropertyName.types b/tests/baselines/reference/argumentsAsPropertyName.types index d0aaaa1cc72..73bb6987223 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.types +++ b/tests/baselines/reference/argumentsAsPropertyName.types @@ -42,12 +42,12 @@ function myFunction(myType: MyType) { [1, 2, 3].forEach(function(j) { use(x); }) >[1, 2, 3].forEach(function(j) { use(x); }) : void ->[1, 2, 3].forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>[1, 2, 3].forEach : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void >function(j) { use(x); } : (j: number) => void >j : number >use(x) : any diff --git a/tests/baselines/reference/arrayConcat2.types b/tests/baselines/reference/arrayConcat2.types index 7687c5ed8fe..2a87d8f6a6d 100644 --- a/tests/baselines/reference/arrayConcat2.types +++ b/tests/baselines/reference/arrayConcat2.types @@ -5,17 +5,17 @@ var a: string[] = []; a.concat("hello", 'world'); >a.concat("hello", 'world') : string[] ->a.concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; } +>a.concat : { (this: readonly, ...items: string[][]): string[]; (this: readonly, ...items: (string | string[])[]): string[]; } >a : string[] ->concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; } +>concat : { (this: readonly, ...items: string[][]): string[]; (this: readonly, ...items: (string | string[])[]): string[]; } >"hello" : "hello" >'world' : "world" a.concat('Hello'); >a.concat('Hello') : string[] ->a.concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; } +>a.concat : { (this: readonly, ...items: string[][]): string[]; (this: readonly, ...items: (string | string[])[]): string[]; } >a : string[] ->concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; } +>concat : { (this: readonly, ...items: string[][]): string[]; (this: readonly, ...items: (string | string[])[]): string[]; } >'Hello' : "Hello" var b = new Array(); @@ -25,8 +25,8 @@ var b = new Array(); b.concat('hello'); >b.concat('hello') : string[] ->b.concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; } +>b.concat : { (this: readonly, ...items: string[][]): string[]; (this: readonly, ...items: (string | string[])[]): string[]; } >b : string[] ->concat : { (...items: string[][]): string[]; (...items: (string | string[])[]): string[]; } +>concat : { (this: readonly, ...items: string[][]): string[]; (this: readonly, ...items: (string | string[])[]): string[]; } >'hello' : "hello" diff --git a/tests/baselines/reference/arrayConcatMap.types b/tests/baselines/reference/arrayConcatMap.types index 89289e58d4e..78b39a762ad 100644 --- a/tests/baselines/reference/arrayConcatMap.types +++ b/tests/baselines/reference/arrayConcatMap.types @@ -2,11 +2,11 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : any[] >[].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a) : any[] ->[].concat([{ a: 1 }], [{ a: 2 }]) .map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>[].concat([{ a: 1 }], [{ a: 2 }]) .map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >[].concat([{ a: 1 }], [{ a: 2 }]) : any[] ->[].concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } +>[].concat : { (this: readonly, ...items: any[][]): any[]; (this: readonly, ...items: any[]): any[]; } >[] : undefined[] ->concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } +>concat : { (this: readonly, ...items: any[][]): any[]; (this: readonly, ...items: any[]): any[]; } >[{ a: 1 }] : { a: number; }[] >{ a: 1 } : { a: number; } >a : number @@ -17,7 +17,7 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) >2 : 2 .map(b => b.a); ->map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >b => b.a : (b: any) => any >b : any >b.a : any diff --git a/tests/baselines/reference/arrayFilter.types b/tests/baselines/reference/arrayFilter.types index 7d91ef4ed32..59a943922da 100644 --- a/tests/baselines/reference/arrayFilter.types +++ b/tests/baselines/reference/arrayFilter.types @@ -22,9 +22,9 @@ var foo = [ foo.filter(x => x.name); //should accepted all possible types not only boolean! >foo.filter(x => x.name) : { name: string; }[] ->foo.filter : { (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any): { name: string; }[]; } +>foo.filter : { (this: readonly, callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any): { name: string; }[]; } >foo : { name: string; }[] ->filter : { (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any): { name: string; }[]; } +>filter : { (this: readonly, callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any): { name: string; }[]; } >x => x.name : (x: { name: string; }) => string >x : { name: string; } >x.name : string diff --git a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt index df24be3a020..b56d46a7e18 100644 --- a/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt +++ b/tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt @@ -1,12 +1,12 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(13,1): error TS2322: Type 'A[]' is not assignable to type 'ReadonlyArray'. Types of property 'concat' are incompatible. - Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. + Type '{ (this: readonly, ...items: A[][]): A[]; (this: readonly, ...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. Type 'A[]' is not assignable to type 'B[]'. Type 'A' is not assignable to type 'B'. Property 'b' is missing in type 'A'. tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error TS2322: Type 'C' is not assignable to type 'ReadonlyArray'. Types of property 'concat' are incompatible. - Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. + Type '{ (this: readonly, ...items: A[][]): A[]; (this: readonly, ...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. Type 'A[]' is not assignable to type 'B[]'. @@ -27,7 +27,7 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T ~~~ !!! error TS2322: Type 'A[]' is not assignable to type 'ReadonlyArray'. !!! error TS2322: Types of property 'concat' are incompatible. -!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. +!!! error TS2322: Type '{ (this: readonly, ...items: A[][]): A[]; (this: readonly, ...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. !!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. !!! error TS2322: Type 'A' is not assignable to type 'B'. !!! error TS2322: Property 'b' is missing in type 'A'. @@ -39,6 +39,6 @@ tests/cases/compiler/arrayOfSubtypeIsAssignableToReadonlyArray.ts(18,1): error T ~~~ !!! error TS2322: Type 'C' is not assignable to type 'ReadonlyArray'. !!! error TS2322: Types of property 'concat' are incompatible. -!!! error TS2322: Type '{ (...items: A[][]): A[]; (...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. +!!! error TS2322: Type '{ (this: readonly, ...items: A[][]): A[]; (this: readonly, ...items: (A | A[])[]): A[]; }' is not assignable to type '{ (...items: B[][]): B[]; (...items: (B | B[])[]): B[]; }'. !!! error TS2322: Type 'A[]' is not assignable to type 'B[]'. \ No newline at end of file diff --git a/tests/baselines/reference/bestChoiceType.types b/tests/baselines/reference/bestChoiceType.types index 49997d1e273..4114c834d44 100644 --- a/tests/baselines/reference/bestChoiceType.types +++ b/tests/baselines/reference/bestChoiceType.types @@ -3,7 +3,7 @@ (''.match(/ /) || []).map(s => s.toLowerCase()); >(''.match(/ /) || []).map(s => s.toLowerCase()) : string[] ->(''.match(/ /) || []).map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>(''.match(/ /) || []).map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >(''.match(/ /) || []) : RegExpMatchArray >''.match(/ /) || [] : RegExpMatchArray >''.match(/ /) : RegExpMatchArray | null @@ -12,7 +12,7 @@ >match : (regexp: string | RegExp) => RegExpMatchArray | null >/ / : RegExp >[] : never[] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s => s.toLowerCase() : (s: string) => string >s : string >s.toLowerCase() : string @@ -42,9 +42,9 @@ function f1() { let z = y.map(s => s.toLowerCase()); >z : string[] >y.map(s => s.toLowerCase()) : string[] ->y.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>y.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >y : RegExpMatchArray ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s => s.toLowerCase() : (s: string) => string >s : string >s.toLowerCase() : string @@ -74,9 +74,9 @@ function f2() { let z = y.map(s => s.toLowerCase()); >z : string[] >y.map(s => s.toLowerCase()) : string[] ->y.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>y.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >y : RegExpMatchArray ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s => s.toLowerCase() : (s: string) => string >s : string >s.toLowerCase() : string diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types index 30f584894fc..7c8df3eca39 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types @@ -13,9 +13,9 @@ class A { x.forEach((v) => { >x.forEach((v) => { switch(v) { case "test": use(this); } }) : void ->x.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>x.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >x : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >(v) => { switch(v) { case "test": use(this); } } : (v: string) => void >v : string diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3.types b/tests/baselines/reference/classExpressionWithStaticProperties3.types index 67823ea8340..5a14df89d18 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties3.types +++ b/tests/baselines/reference/classExpressionWithStaticProperties3.types @@ -41,9 +41,9 @@ for (let i = 0; i < 3; i++) { } arr.forEach(C => console.log(C.y())); >arr.forEach(C => console.log(C.y())) : void ->arr.forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>arr.forEach : (this: readonly, callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void >arr : { y(): number; }[] ->forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void >C => console.log(C.y()) : (C: { y(): number; }) => any >C : { y(): number; } >console.log(C.y()) : any diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types index 5a948f54402..b369f789fbd 100644 --- a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types @@ -41,9 +41,9 @@ for (let i = 0; i < 3; i++) { } arr.forEach(C => console.log(C.y())); >arr.forEach(C => console.log(C.y())) : void ->arr.forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>arr.forEach : (this: readonly, callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void >arr : { y(): number; }[] ->forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void >C => console.log(C.y()) : (C: { y(): number; }) => any >C : { y(): number; } >console.log(C.y()) : any diff --git a/tests/baselines/reference/commaOperatorInConditionalExpression.types b/tests/baselines/reference/commaOperatorInConditionalExpression.types index 1d1037c1206..39d95d14ada 100644 --- a/tests/baselines/reference/commaOperatorInConditionalExpression.types +++ b/tests/baselines/reference/commaOperatorInConditionalExpression.types @@ -5,12 +5,12 @@ function f (m: string) { [1, 2, 3].map(i => { >[1, 2, 3].map(i => { return true? { [m]: i } : { [m]: i + 1 } }) : { [x: string]: number; }[] ->[1, 2, 3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>[1, 2, 3].map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >i => { return true? { [m]: i } : { [m]: i + 1 } } : (i: number) => { [x: string]: number; } >i : number diff --git a/tests/baselines/reference/commentInMethodCall.types b/tests/baselines/reference/commentInMethodCall.types index e9543a8c6f2..7841f0c96b8 100644 --- a/tests/baselines/reference/commentInMethodCall.types +++ b/tests/baselines/reference/commentInMethodCall.types @@ -5,9 +5,9 @@ var s: string[]; s.map(// do something >s.map(// do something function () { }) : void[] ->s.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>s.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s : string[] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] function () { }); >function () { } : () => void diff --git a/tests/baselines/reference/concatError.types b/tests/baselines/reference/concatError.types index f97018cd3b9..4db7e0b911d 100644 --- a/tests/baselines/reference/concatError.types +++ b/tests/baselines/reference/concatError.types @@ -15,9 +15,9 @@ fa = fa.concat([0]); >fa = fa.concat([0]) : number[] >fa : number[] >fa.concat([0]) : number[] ->fa.concat : { (...items: number[][]): number[]; (...items: (number | number[])[]): number[]; } +>fa.concat : { (this: readonly, ...items: number[][]): number[]; (this: readonly, ...items: (number | number[])[]): number[]; } >fa : number[] ->concat : { (...items: number[][]): number[]; (...items: (number | number[])[]): number[]; } +>concat : { (this: readonly, ...items: number[][]): number[]; (this: readonly, ...items: (number | number[])[]): number[]; } >[0] : number[] >0 : 0 @@ -25,9 +25,9 @@ fa = fa.concat(0); >fa = fa.concat(0) : number[] >fa : number[] >fa.concat(0) : number[] ->fa.concat : { (...items: number[][]): number[]; (...items: (number | number[])[]): number[]; } +>fa.concat : { (this: readonly, ...items: number[][]): number[]; (this: readonly, ...items: (number | number[])[]): number[]; } >fa : number[] ->concat : { (...items: number[][]): number[]; (...items: (number | number[])[]): number[]; } +>concat : { (this: readonly, ...items: number[][]): number[]; (this: readonly, ...items: (number | number[])[]): number[]; } >0 : 0 diff --git a/tests/baselines/reference/concatTuples.types b/tests/baselines/reference/concatTuples.types index fbb3ce96a57..f7a41f76be4 100644 --- a/tests/baselines/reference/concatTuples.types +++ b/tests/baselines/reference/concatTuples.types @@ -10,9 +10,9 @@ ijs = ijs.concat([[3, 4], [5, 6]]); >ijs = ijs.concat([[3, 4], [5, 6]]) : [number, number][] >ijs : [number, number][] >ijs.concat([[3, 4], [5, 6]]) : [number, number][] ->ijs.concat : { (...items: [number, number][][]): [number, number][]; (...items: ([number, number] | [number, number][])[]): [number, number][]; } +>ijs.concat : { (this: readonly, ...items: [number, number][][]): [number, number][]; (this: readonly, ...items: ([number, number] | [number, number][])[]): [number, number][]; } >ijs : [number, number][] ->concat : { (...items: [number, number][][]): [number, number][]; (...items: ([number, number] | [number, number][])[]): [number, number][]; } +>concat : { (this: readonly, ...items: [number, number][][]): [number, number][]; (this: readonly, ...items: ([number, number] | [number, number][])[]): [number, number][]; } >[[3, 4], [5, 6]] : [number, number][] >[3, 4] : [number, number] >3 : 3 diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.types b/tests/baselines/reference/contextualSignatureInstantiation3.types index 945a4374ad1..988808dbe8f 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.types +++ b/tests/baselines/reference/contextualSignatureInstantiation3.types @@ -13,9 +13,9 @@ function map(items: T[], f: (x: T) => U): U[]{ return items.map(f); >items.map(f) : U[] ->items.map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>items.map : (this: readonly, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >items : T[] ->map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >f : (x: T) => U } @@ -54,9 +54,9 @@ var v1: number[]; var v1 = xs.map(identity); // Error if not number[] >v1 : number[] >xs.map(identity) : number[] ->xs.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>xs.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >xs : number[] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >identity : (x: T) => T var v1 = map(xs, identity); // Error if not number[] @@ -72,9 +72,9 @@ var v2: number[][]; var v2 = xs.map(singleton); // Error if not number[][] >v2 : number[][] >xs.map(singleton) : number[][] ->xs.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>xs.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >xs : number[] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >singleton : (x: T) => T[] var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/contextuallyTypedIife.types b/tests/baselines/reference/contextuallyTypedIife.types index 7b86fe1f337..4288d166661 100644 --- a/tests/baselines/reference/contextuallyTypedIife.types +++ b/tests/baselines/reference/contextuallyTypedIife.types @@ -105,9 +105,9 @@ >(...numbers) => numbers.every(n => n > 0) : (...numbers: number[]) => boolean >numbers : number[] >numbers.every(n => n > 0) : boolean ->numbers.every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>numbers.every : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >numbers : number[] ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >n => n > 0 : (n: number) => boolean >n : number >n > 0 : boolean @@ -123,9 +123,9 @@ >(...mixed) => mixed.every(n => !!n) : (...mixed: (string | number)[]) => boolean >mixed : (string | number)[] >mixed.every(n => !!n) : boolean ->mixed.every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean +>mixed.every : (this: readonly, callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean >mixed : (string | number)[] ->every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean >n => !!n : (n: string | number) => boolean >n : string | number >!!n : boolean @@ -141,9 +141,9 @@ >(...noNumbers) => noNumbers.some(n => n > 0) : (...noNumbers: any[]) => boolean >noNumbers : any[] >noNumbers.some(n => n > 0) : boolean ->noNumbers.some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean +>noNumbers.some : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean >noNumbers : any[] ->some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean >n => n > 0 : (n: any) => boolean >n : any >n > 0 : boolean @@ -160,9 +160,9 @@ >first : number >[] : undefined[] >rest.map(n => n > 0) : boolean[] ->rest.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>rest.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >rest : number[] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n > 0 : (n: number) => boolean >n : number >n > 0 : boolean diff --git a/tests/baselines/reference/controlFlowDestructuringParameters.types b/tests/baselines/reference/controlFlowDestructuringParameters.types index 9c6c96de540..ca64dad935c 100644 --- a/tests/baselines/reference/controlFlowDestructuringParameters.types +++ b/tests/baselines/reference/controlFlowDestructuringParameters.types @@ -4,12 +4,12 @@ [{ x: 1 }].map( >[{ x: 1 }].map( ({ x }) => x) : number[] ->[{ x: 1 }].map : (callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any) => U[] +>[{ x: 1 }].map : (this: readonly, callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any) => U[] >[{ x: 1 }] : { x: number; }[] >{ x: 1 } : { x: number; } >x : number >1 : 1 ->map : (callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any) => U[] ({ x }) => x >({ x }) => x : ({ x }: { x: number; }) => number diff --git a/tests/baselines/reference/controlFlowOuterVariable.types b/tests/baselines/reference/controlFlowOuterVariable.types index 10d46d10bfc..ced71a7da33 100644 --- a/tests/baselines/reference/controlFlowOuterVariable.types +++ b/tests/baselines/reference/controlFlowOuterVariable.types @@ -34,8 +34,8 @@ const helper = function(t: T[]) { >helper(t.slice(1)) : void >helper : (t: T[]) => void >t.slice(1) : T[] ->t.slice : (start?: number | undefined, end?: number | undefined) => T[] +>t.slice : (this: readonly, start?: number | undefined, end?: number | undefined) => T[] >t : T[] ->slice : (start?: number | undefined, end?: number | undefined) => T[] +>slice : (this: readonly, start?: number | undefined, end?: number | undefined) => T[] >1 : 1 } diff --git a/tests/baselines/reference/declFileConstructors.types b/tests/baselines/reference/declFileConstructors.types index 179db643bcb..dc24708fdcb 100644 --- a/tests/baselines/reference/declFileConstructors.types +++ b/tests/baselines/reference/declFileConstructors.types @@ -34,9 +34,9 @@ export class ConstructorWithRestParamters { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } } @@ -124,9 +124,9 @@ class GlobalConstructorWithRestParamters { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } } diff --git a/tests/baselines/reference/declFileFunctions.types b/tests/baselines/reference/declFileFunctions.types index c5bb89d38d3..4935589d7c2 100644 --- a/tests/baselines/reference/declFileFunctions.types +++ b/tests/baselines/reference/declFileFunctions.types @@ -25,9 +25,9 @@ export function fooWithRestParameters(a: string, ...rests: string[]) { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } @@ -123,9 +123,9 @@ function nonExportedFooWithRestParameters(a: string, ...rests: string[]) { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } @@ -172,9 +172,9 @@ function globalfooWithRestParameters(a: string, ...rests: string[]) { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } function globalfooWithOverloads(a: string): string; diff --git a/tests/baselines/reference/declFileMethods.types b/tests/baselines/reference/declFileMethods.types index 6c378a53593..0193e90ba63 100644 --- a/tests/baselines/reference/declFileMethods.types +++ b/tests/baselines/reference/declFileMethods.types @@ -28,9 +28,9 @@ export class c1 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } @@ -77,9 +77,9 @@ export class c1 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } private privateFooWithOverloads(a: string): string; @@ -125,9 +125,9 @@ export class c1 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } static staticFooWithOverloads(a: string): string; @@ -173,9 +173,9 @@ export class c1 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } private static privateStaticFooWithOverloads(a: string): string; @@ -255,9 +255,9 @@ class c2 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } @@ -304,9 +304,9 @@ class c2 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } private privateFooWithOverloads(a: string): string; @@ -352,9 +352,9 @@ class c2 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } static staticFooWithOverloads(a: string): string; @@ -400,9 +400,9 @@ class c2 { >a + rests.join("") : string >a : string >rests.join("") : string ->rests.join : (separator?: string) => string +>rests.join : (this: readonly, separator?: string) => string >rests : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >"" : "" } private static privateStaticFooWithOverloads(a: string): string; diff --git a/tests/baselines/reference/declarationEmitPromise.types b/tests/baselines/reference/declarationEmitPromise.types index d3fc75c63ad..5f99706653e 100644 --- a/tests/baselines/reference/declarationEmitPromise.types +++ b/tests/baselines/reference/declarationEmitPromise.types @@ -44,14 +44,14 @@ export async function runSampleWorks( >bluebird : typeof bluebird >all : bluebird[] >[a, b, c, d, e].filter(el => !!el) : bluebird[] ->[a, b, c, d, e].filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } +>[a, b, c, d, e].filter : { >(this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } >[a, b, c, d, e] : bluebird[] >a : bluebird >b : bluebird >c : bluebird >d : bluebird >e : bluebird ->filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } +>filter : { >(this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } >el => !!el : (el: bluebird) => boolean >el : bluebird >!!el : boolean @@ -129,14 +129,14 @@ export async function runSampleBreaks( >bluebird : typeof bluebird >all : bluebird[] >[a, b, c, d, e].filter(el => !!el) : bluebird[] ->[a, b, c, d, e].filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } +>[a, b, c, d, e].filter : { >(this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } >[a, b, c, d, e] : bluebird[] >a : bluebird >b : bluebird >c : bluebird >d : bluebird >e : bluebird ->filter : { >(callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } +>filter : { >(this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any): bluebird[]; } >el => !!el : (el: bluebird) => boolean >el : bluebird >!!el : boolean diff --git a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types index bc7214eb6b9..045c4c191f5 100644 --- a/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types +++ b/tests/baselines/reference/duplicateOverloadInTypeAugmentation1.types @@ -4,7 +4,7 @@ interface Array { >T : T reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, ->reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (this: readonly, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >callbackfn : (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T >previousValue : T >T : T @@ -21,7 +21,7 @@ interface Array { >T : T reduce(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, ->reduce : { (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (this: readonly, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; (callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; (callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; } >U : U >callbackfn : (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U >previousValue : U @@ -45,9 +45,9 @@ var a: Array; var r5 = a.reduce((x, y) => x + y); >r5 : string >a.reduce((x, y) => x + y) : string ->a.reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>a.reduce : { (this: readonly, callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (this: readonly, callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >a : string[] ->reduce : { (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (this: readonly, callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; (callbackfn: (previousValue: string, currentValue: string, currentIndex: number, array: string[]) => string, initialValue?: string): string; (callbackfn: (previousValue: U, currentValue: string, currentIndex: number, array: string[]) => U, initialValue: U): U; } >(x, y) => x + y : (x: string, y: string) => string >x : string >y : string diff --git a/tests/baselines/reference/emitSkipsThisWithRestParameter.types b/tests/baselines/reference/emitSkipsThisWithRestParameter.types index ff6f1e6f73a..de49b21618f 100644 --- a/tests/baselines/reference/emitSkipsThisWithRestParameter.types +++ b/tests/baselines/reference/emitSkipsThisWithRestParameter.types @@ -18,10 +18,10 @@ function rebase(fn: (base: any, ...args: any[]) => any): (...args: any[]) => any >apply : (this: Function, thisArg: any, argArray?: any) => any >this : any >[ this ].concat(args) : any[] ->[ this ].concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } +>[ this ].concat : { (this: readonly, ...items: any[][]): any[]; (this: readonly, ...items: any[]): any[]; } >[ this ] : any[] >this : any ->concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } +>concat : { (this: readonly, ...items: any[][]): any[]; (this: readonly, ...items: any[]): any[]; } >args : any[] }; diff --git a/tests/baselines/reference/enumIndexer.types b/tests/baselines/reference/enumIndexer.types index 6c6e50822b5..133430a8d50 100644 --- a/tests/baselines/reference/enumIndexer.types +++ b/tests/baselines/reference/enumIndexer.types @@ -25,9 +25,9 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : boolean[] >_arr.map(o => MyEnumType[o.key] === enumValue) : boolean[] ->_arr.map : (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] +>_arr.map : (this: readonly, callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] >_arr : { key: string; }[] ->map : (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any) => U[] >o => MyEnumType[o.key] === enumValue : (o: { key: string; }) => boolean >o : { key: string; } >MyEnumType[o.key] === enumValue : boolean diff --git a/tests/baselines/reference/genericArray1.types b/tests/baselines/reference/genericArray1.types index baa2ec8a9cf..160821f91a5 100644 --- a/tests/baselines/reference/genericArray1.types +++ b/tests/baselines/reference/genericArray1.types @@ -14,12 +14,12 @@ interface String{ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : number[] >["a", "b", "c"].map(x => x.length) : number[] ->["a", "b", "c"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b", "c"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b", "c"] : string[] >"a" : "a" >"b" : "b" >"c" : "c" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >x => x.length : (x: string) => number >x : string >x.length : number diff --git a/tests/baselines/reference/genericContextualTypes1.types b/tests/baselines/reference/genericContextualTypes1.types index b1a7aff8eef..dae962c5950 100644 --- a/tests/baselines/reference/genericContextualTypes1.types +++ b/tests/baselines/reference/genericContextualTypes1.types @@ -230,9 +230,9 @@ const arrayMap = (f: (x: T) => U) => (a: T[]) => a.map(f); >a : T[] >T : T >a.map(f) : U[] ->a.map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>a.map : (this: readonly, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >a : T[] ->map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >f : (x: T) => U const arrayFilter = (f: (x: T) => boolean) => (a: T[]) => a.filter(f); @@ -246,9 +246,9 @@ const arrayFilter = (f: (x: T) => boolean) => (a: T[]) => a.filter(f); >a : T[] >T : T >a.filter(f) : T[] ->a.filter : { (callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; } +>a.filter : { (this: readonly, callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; } >a : T[] ->filter : { (callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; } +>filter : { (this: readonly, callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; } >f : (x: T) => boolean const f20: (a: string[]) => number[] = arrayMap(x => x.length); diff --git a/tests/baselines/reference/genericContextualTypingSpecialization.types b/tests/baselines/reference/genericContextualTypingSpecialization.types index 82255020347..aed65f6fb22 100644 --- a/tests/baselines/reference/genericContextualTypingSpecialization.types +++ b/tests/baselines/reference/genericContextualTypingSpecialization.types @@ -4,9 +4,9 @@ var b: number[]; b.reduce((c, d) => c + d, 0); // should not error on '+' >b.reduce((c, d) => c + d, 0) : number ->b.reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>b.reduce : { (this: readonly, callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (this: readonly, callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >b : number[] ->reduce : { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue?: number): number; (this: readonly, callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; } >(c, d) => c + d : (c: number, d: number) => number >c : number >d : number diff --git a/tests/baselines/reference/genericInference1.types b/tests/baselines/reference/genericInference1.types index 30b7279ebc0..71daa4c0c34 100644 --- a/tests/baselines/reference/genericInference1.types +++ b/tests/baselines/reference/genericInference1.types @@ -1,12 +1,12 @@ === tests/cases/compiler/genericInference1.ts === ['a', 'b', 'c'].map(x => x.length); >['a', 'b', 'c'].map(x => x.length) : number[] ->['a', 'b', 'c'].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>['a', 'b', 'c'].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >['a', 'b', 'c'] : string[] >'a' : "a" >'b' : "b" >'c' : "c" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >x => x.length : (x: string) => number >x : string >x.length : number diff --git a/tests/baselines/reference/genericMethodOverspecialization.types b/tests/baselines/reference/genericMethodOverspecialization.types index 40286124f51..419d0e0c416 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.types +++ b/tests/baselines/reference/genericMethodOverspecialization.types @@ -34,9 +34,9 @@ interface Document { var elements = names.map(function (name) { >elements : HTMLElement[] >names.map(function (name) { return document.getElementById(name);}) : HTMLElement[] ->names.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>names.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >names : string[] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >function (name) { return document.getElementById(name);} : (name: string) => HTMLElement >name : string @@ -53,9 +53,9 @@ var elements = names.map(function (name) { var xxx = elements.filter(function (e) { >xxx : HTMLElement[] >elements.filter(function (e) { return !e.isDisabled;}) : HTMLElement[] ->elements.filter : { (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any): HTMLElement[]; } +>elements.filter : { (this: readonly, callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any): HTMLElement[]; } >elements : HTMLElement[] ->filter : { (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any): HTMLElement[]; } +>filter : { (this: readonly, callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any): HTMLElement[]; } >function (e) { return !e.isDisabled;} : (e: HTMLElement) => boolean >e : HTMLElement @@ -70,9 +70,9 @@ var xxx = elements.filter(function (e) { var widths:number[] = elements.map(function (e) { // should not error >widths : number[] >elements.map(function (e) { // should not error return e.clientWidth;}) : number[] ->elements.map : (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any) => U[] +>elements.map : (this: readonly, callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any) => U[] >elements : HTMLElement[] ->map : (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any) => U[] >function (e) { // should not error return e.clientWidth;} : (e: HTMLElement) => number >e : HTMLElement diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types index cf7752e237e..020590425e8 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes2.types @@ -120,11 +120,11 @@ foo(wrap(s => s.length)); let a1 = ["a", "b"].map(s => s.length); >a1 : number[] >["a", "b"].map(s => s.length) : number[] ->["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s => s.length : (s: string) => number >s : string >s.length : number @@ -134,11 +134,11 @@ let a1 = ["a", "b"].map(s => s.length); let a2 = ["a", "b"].map(wrap(s => s.length)); >a2 : number[] >["a", "b"].map(wrap(s => s.length)) : number[] ->["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >wrap(s => s.length) : Mapper >wrap : (cb: Mapper) => Mapper >s => s.length : (s: string) => number @@ -150,11 +150,11 @@ let a2 = ["a", "b"].map(wrap(s => s.length)); let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); >a3 : number[][] >["a", "b"].map(wrap(arrayize(s => s.length))) : number[][] ->["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >wrap(arrayize(s => s.length)) : Mapper >wrap : (cb: Mapper) => Mapper >arrayize(s => s.length) : Mapper @@ -168,11 +168,11 @@ let a3 = ["a", "b"].map(wrap(arrayize(s => s.length))); let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); >a4 : boolean[] >["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))) : boolean[] ->["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >combine(wrap(s => s.length), wrap(n => n > 10)) : (x: string) => boolean >combine : (f: (x: A) => B, g: (x: B) => C) => (x: A) => C >wrap(s => s.length) : Mapper @@ -193,11 +193,11 @@ let a4 = ["a", "b"].map(combine(wrap(s => s.length), wrap(n => n > 10))); let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); >a5 : number[] >["a", "b"].map(combine(identity, wrap(s => s.length))) : number[] ->["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >combine(identity, wrap(s => s.length)) : (x: string) => number >combine : (f: (x: A) => B, g: (x: B) => C) => (x: A) => C >identity : (x: T) => T @@ -212,11 +212,11 @@ let a5 = ["a", "b"].map(combine(identity, wrap(s => s.length))); let a6 = ["a", "b"].map(combine(wrap(s => s.length), identity)); >a6 : number[] >["a", "b"].map(combine(wrap(s => s.length), identity)) : number[] ->["a", "b"].map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>["a", "b"].map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >["a", "b"] : string[] >"a" : "a" >"b" : "b" ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >combine(wrap(s => s.length), identity) : (x: string) => number >combine : (f: (x: A) => B, g: (x: B) => C) => (x: A) => C >wrap(s => s.length) : Mapper @@ -279,11 +279,11 @@ class SetOf { this._store.forEach((a, i) => fn(a, i)); >this._store.forEach((a, i) => fn(a, i)) : void ->this._store.forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void +>this._store.forEach : (this: readonly, callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >this._store : A[] >this : this >_store : A[] ->forEach : (callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: A, index: number, array: A[]) => void, thisArg?: any) => void >(a, i) => fn(a, i) : (a: A, i: number) => void >a : A >i : number @@ -358,9 +358,9 @@ function compose(...fns: ((x: T) => T)[]): (x: T) => T { >x : T >T : T >fns.reduce((prev, fn) => fn(prev), x) : T ->fns.reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>fns.reduce : { (this: readonly, callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (this: readonly, callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >fns : ((x: T) => T)[] ->reduce : { (callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: (x: T) => T, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => (x: T) => T, initialValue?: (x: T) => T): (x: T) => T; (this: readonly, callbackfn: (previousValue: U, currentValue: (x: T) => T, currentIndex: number, array: ((x: T) => T)[]) => U, initialValue: U): U; } >(prev, fn) => fn(prev) : (prev: T, fn: (x: T) => T) => T >prev : T >fn : (x: T) => T diff --git a/tests/baselines/reference/inferenceLimit.types b/tests/baselines/reference/inferenceLimit.types index 4a398932232..a744cc39ebc 100644 --- a/tests/baselines/reference/inferenceLimit.types +++ b/tests/baselines/reference/inferenceLimit.types @@ -84,9 +84,9 @@ export class BrokenClass { >Promise : PromiseConstructor >all : { (values: Iterable>): Promise; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; (values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; (values: (T | PromiseLike)[]): Promise; } >result.map(populateItems) : Promise<{}>[] ->result.map : (callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[] +>result.map : (this: readonly, callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[] >result : MyModule.MyModel[] ->map : (callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any) => U[] >populateItems : (order: any) => Promise<{}> .then((orders: Array) => { diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.types b/tests/baselines/reference/inferentialTypingWithFunctionType2.types index 2c4bb2542fb..88d0da0a851 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.types @@ -13,12 +13,12 @@ var x = [1, 2, 3].map(identity)[0]; >x : number >[1, 2, 3].map(identity)[0] : number >[1, 2, 3].map(identity) : number[] ->[1, 2, 3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>[1, 2, 3].map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >identity : (a: A) => A >0 : 0 diff --git a/tests/baselines/reference/iteratorSpreadInArray7.types b/tests/baselines/reference/iteratorSpreadInArray7.types index b102c72486b..fd0325381d9 100644 --- a/tests/baselines/reference/iteratorSpreadInArray7.types +++ b/tests/baselines/reference/iteratorSpreadInArray7.types @@ -35,9 +35,9 @@ var array: symbol[]; array.concat([...new SymbolIterator]); >array.concat([...new SymbolIterator]) : symbol[] ->array.concat : { (...items: symbol[][]): symbol[]; (...items: (symbol | symbol[])[]): symbol[]; } +>array.concat : { (this: readonly, ...items: symbol[][]): symbol[]; (this: readonly, ...items: (symbol | symbol[])[]): symbol[]; } >array : symbol[] ->concat : { (...items: symbol[][]): symbol[]; (...items: (symbol | symbol[])[]): symbol[]; } +>concat : { (this: readonly, ...items: symbol[][]): symbol[]; (this: readonly, ...items: (symbol | symbol[])[]): symbol[]; } >[...new SymbolIterator] : symbol[] >...new SymbolIterator : symbol >new SymbolIterator : SymbolIterator diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 671289527aa..aef74e0837c 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -522,9 +522,9 @@ function pluck(array: T[], key: K) { return array.map(x => x[key]); >array.map(x => x[key]) : T[K][] ->array.map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>array.map : (this: readonly, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >array : T[] ->map : (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[] >x => x[key] : (x: T) => T[K] >x : T >x[key] : T[K] diff --git a/tests/baselines/reference/library_ArraySlice.types b/tests/baselines/reference/library_ArraySlice.types index 5fe3858628a..2bf2a8b8b2c 100644 --- a/tests/baselines/reference/library_ArraySlice.types +++ b/tests/baselines/reference/library_ArraySlice.types @@ -2,28 +2,28 @@ // Array.prototype.slice can have zero, one, or two arguments Array.prototype.slice(); >Array.prototype.slice() : any[] ->Array.prototype.slice : (start?: number, end?: number) => any[] +>Array.prototype.slice : (this: readonly, start?: number, end?: number) => any[] >Array.prototype : any[] >Array : ArrayConstructor >prototype : any[] ->slice : (start?: number, end?: number) => any[] +>slice : (this: readonly, start?: number, end?: number) => any[] Array.prototype.slice(0); >Array.prototype.slice(0) : any[] ->Array.prototype.slice : (start?: number, end?: number) => any[] +>Array.prototype.slice : (this: readonly, start?: number, end?: number) => any[] >Array.prototype : any[] >Array : ArrayConstructor >prototype : any[] ->slice : (start?: number, end?: number) => any[] +>slice : (this: readonly, start?: number, end?: number) => any[] >0 : 0 Array.prototype.slice(0, 1); >Array.prototype.slice(0, 1) : any[] ->Array.prototype.slice : (start?: number, end?: number) => any[] +>Array.prototype.slice : (this: readonly, start?: number, end?: number) => any[] >Array.prototype : any[] >Array : ArrayConstructor >prototype : any[] ->slice : (start?: number, end?: number) => any[] +>slice : (this: readonly, start?: number, end?: number) => any[] >0 : 0 >1 : 1 diff --git a/tests/baselines/reference/library_RegExpExecArraySlice.types b/tests/baselines/reference/library_RegExpExecArraySlice.types index 0fd2a319833..6a2f03c59ba 100644 --- a/tests/baselines/reference/library_RegExpExecArraySlice.types +++ b/tests/baselines/reference/library_RegExpExecArraySlice.types @@ -6,22 +6,22 @@ var regExpExecArrayValue: RegExpExecArray; regExpExecArrayValue.slice(); >regExpExecArrayValue.slice() : string[] ->regExpExecArrayValue.slice : (start?: number, end?: number) => string[] +>regExpExecArrayValue.slice : (this: readonly, start?: number, end?: number) => string[] >regExpExecArrayValue : RegExpExecArray ->slice : (start?: number, end?: number) => string[] +>slice : (this: readonly, start?: number, end?: number) => string[] regExpExecArrayValue.slice(0); >regExpExecArrayValue.slice(0) : string[] ->regExpExecArrayValue.slice : (start?: number, end?: number) => string[] +>regExpExecArrayValue.slice : (this: readonly, start?: number, end?: number) => string[] >regExpExecArrayValue : RegExpExecArray ->slice : (start?: number, end?: number) => string[] +>slice : (this: readonly, start?: number, end?: number) => string[] >0 : 0 regExpExecArrayValue.slice(0,1); >regExpExecArrayValue.slice(0,1) : string[] ->regExpExecArrayValue.slice : (start?: number, end?: number) => string[] +>regExpExecArrayValue.slice : (this: readonly, start?: number, end?: number) => string[] >regExpExecArrayValue : RegExpExecArray ->slice : (start?: number, end?: number) => string[] +>slice : (this: readonly, start?: number, end?: number) => string[] >0 : 0 >1 : 1 diff --git a/tests/baselines/reference/literalTypes2.types b/tests/baselines/reference/literalTypes2.types index ab1d3e199d2..f322adfe89b 100644 --- a/tests/baselines/reference/literalTypes2.types +++ b/tests/baselines/reference/literalTypes2.types @@ -781,9 +781,9 @@ function append(a: T[], x: T): T[] { let result = a.slice(); >result : T[] >a.slice() : T[] ->a.slice : (start?: number, end?: number) => T[] +>a.slice : (this: readonly, start?: number, end?: number) => T[] >a : T[] ->slice : (start?: number, end?: number) => T[] +>slice : (this: readonly, start?: number, end?: number) => T[] result.push(x); >result.push(x) : number diff --git a/tests/baselines/reference/mapOnTupleTypes01.types b/tests/baselines/reference/mapOnTupleTypes01.types index adb8a2e191c..dedf0e4f61a 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.types +++ b/tests/baselines/reference/mapOnTupleTypes01.types @@ -2,13 +2,13 @@ export let mapOnLooseArrayLiteral = [1, 2, 3, 4].map(n => n * n); >mapOnLooseArrayLiteral : number[] >[1, 2, 3, 4].map(n => n * n) : number[] ->[1, 2, 3, 4].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>[1, 2, 3, 4].map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1, 2, 3, 4] : number[] >1 : 1 >2 : 2 >3 : 3 >4 : 4 ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n * n : (n: number) => number >n : number >n * n : number @@ -25,9 +25,9 @@ let numTuple: [number] = [1]; export let a = numTuple.map(x => x * x); >a : number[] >numTuple.map(x => x * x) : number[] ->numTuple.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>numTuple.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numTuple : [number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >x => x * x : (x: number) => number >x : number >x * x : number @@ -57,9 +57,9 @@ let numStr: [number, string] = [ 100, "hello"]; export let b = numNum.map(n => n * n); >b : number[] >numNum.map(n => n * n) : number[] ->numNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>numNum.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNum : [number, number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n * n : (n: number) => number >n : number >n * n : number @@ -69,9 +69,9 @@ export let b = numNum.map(n => n * n); export let c = strStr.map(s => s.charCodeAt(0)); >c : number[] >strStr.map(s => s.charCodeAt(0)) : number[] ->strStr.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>strStr.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >strStr : [string, string] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >s => s.charCodeAt(0) : (s: string) => number >s : string >s.charCodeAt(0) : number @@ -83,9 +83,9 @@ export let c = strStr.map(s => s.charCodeAt(0)); export let d = numStr.map(x => x); >d : (string | number)[] >numStr.map(x => x) : (string | number)[] ->numStr.map : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any) => U[] +>numStr.map : (this: readonly, callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any) => U[] >numStr : [number, string] ->map : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any) => U[] >x => x : (x: string | number) => string | number >x : string | number >x : string | number @@ -102,9 +102,9 @@ let numNumNum: [number, number, number] = [1, 2, 3]; export let e = numNumNum.map(n => n * n); >e : number[] >numNumNum.map(n => n * n) : number[] ->numNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>numNumNum.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNum : [number, number, number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n * n : (n: number) => number >n : number >n * n : number @@ -124,9 +124,9 @@ let numNumNumNum: [number, number, number, number] = [1, 2, 3, 4]; export let f = numNumNumNum.map(n => n * n); >f : number[] >numNumNumNum.map(n => n * n) : number[] ->numNumNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>numNumNumNum.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNumNum : [number, number, number, number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n * n : (n: number) => number >n : number >n * n : number @@ -147,9 +147,9 @@ let numNumNumNumNum: [number, number, number, number, number] = [1, 2, 3, 4, 5]; export let g = numNumNumNumNum.map(n => n * n); >g : number[] >numNumNumNumNum.map(n => n * n) : number[] ->numNumNumNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>numNumNumNumNum.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNumNumNum : [number, number, number, number, number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n * n : (n: number) => number >n : number >n * n : number @@ -172,9 +172,9 @@ let numNumNumNumNumNum: [number, number, number, number, number, number] = [1, 2 export let h = numNumNumNumNum.map(n => n * n); >h : number[] >numNumNumNumNum.map(n => n * n) : number[] ->numNumNumNumNum.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>numNumNumNumNum.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >numNumNumNumNum : [number, number, number, number, number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >n => n * n : (n: number) => number >n : number >n * n : number diff --git a/tests/baselines/reference/mapOnTupleTypes02.types b/tests/baselines/reference/mapOnTupleTypes02.types index 9a0ccef0285..252a3b673eb 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.types +++ b/tests/baselines/reference/mapOnTupleTypes02.types @@ -9,9 +9,9 @@ export function increment(point: Point) { return point.map(d => d + 1); >point.map(d => d + 1) : number[] ->point.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>point.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >point : [number, number] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >d => d + 1 : (d: number) => number >d : number >d + 1 : number diff --git a/tests/baselines/reference/nestedSelf.types b/tests/baselines/reference/nestedSelf.types index 9fb4b0bd65d..30ec9c2e01d 100644 --- a/tests/baselines/reference/nestedSelf.types +++ b/tests/baselines/reference/nestedSelf.types @@ -12,12 +12,12 @@ module M { public foo() { [1,2,3].map((x) => { return this.n * x; })} >foo : () => void >[1,2,3].map((x) => { return this.n * x; }) : number[] ->[1,2,3].map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>[1,2,3].map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >[1,2,3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >(x) => { return this.n * x; } : (x: number) => number >x : number >this.n * x : number diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types index 93b9020c78c..1a80db13707 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types @@ -7,9 +7,9 @@ var regexMatchList = ['', '']; regexMatchList.forEach(match => ''.replace(match, '')); >regexMatchList.forEach(match => ''.replace(match, '')) : void ->regexMatchList.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>regexMatchList.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >regexMatchList : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >match => ''.replace(match, '') : (match: string) => string >match : string >''.replace(match, '') : string diff --git a/tests/baselines/reference/objectRestForOf.types b/tests/baselines/reference/objectRestForOf.types index 43d42a045e1..eda8f7c79ea 100644 --- a/tests/baselines/reference/objectRestForOf.types +++ b/tests/baselines/reference/objectRestForOf.types @@ -36,9 +36,9 @@ for ({ x: xx, ...rrestOff } of array ) { for (const norest of array.map(a => ({ ...a, x: 'a string' }))) { >norest : { x: string; y: string; } >array.map(a => ({ ...a, x: 'a string' })) : { x: string; y: string; }[] ->array.map : (callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any) => U[] +>array.map : (this: readonly, callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any) => U[] >array : { x: number; y: string; }[] ->map : (callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any) => U[] >a => ({ ...a, x: 'a string' }) : (a: { x: number; y: string; }) => { x: string; y: string; } >a : { x: number; y: string; } >({ ...a, x: 'a string' }) : { x: string; y: string; } diff --git a/tests/baselines/reference/returnTypeParameterWithModules.types b/tests/baselines/reference/returnTypeParameterWithModules.types index 584c962a170..ac64fa34e0b 100644 --- a/tests/baselines/reference/returnTypeParameterWithModules.types +++ b/tests/baselines/reference/returnTypeParameterWithModules.types @@ -14,11 +14,11 @@ module M1 { return Array.prototype.reduce.apply(ar, e ? [f, e] : [f]); >Array.prototype.reduce.apply(ar, e ? [f, e] : [f]) : any >Array.prototype.reduce.apply : (this: Function, thisArg: any, argArray?: any) => any ->Array.prototype.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>Array.prototype.reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >Array.prototype : any[] >Array : ArrayConstructor >prototype : any[] ->reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } +>reduce : { (this: readonly, callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; (this: readonly, callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; } >apply : (this: Function, thisArg: any, argArray?: any) => any >ar : any >e ? [f, e] : [f] : any[] diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types index 417a51ac4b8..37df3dcf1fc 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types @@ -1,14 +1,14 @@ === tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts === [].map(() => [].map(p => ({ X: p }))); >[].map(() => [].map(p => ({ X: p }))) : { X: any; }[][] ->[].map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>[].map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >[] : undefined[] ->map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >() => [].map(p => ({ X: p })) : () => { X: any; }[] >[].map(p => ({ X: p })) : { X: any; }[] ->[].map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>[].map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >[] : undefined[] ->map : (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[] >p => ({ X: p }) : (p: any) => { X: any; } >p : any >({ X: p }) : { X: any; } diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types index 6bf7c299a1f..0826c8455fd 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types @@ -25,9 +25,9 @@ function foo() { series2.map(seriesExtent); >series2.map(seriesExtent) : any[] ->series2.map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>series2.map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >series2 : number[] ->map : (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[] >seriesExtent : (series: any) => any return null; @@ -38,11 +38,11 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); >keyExtent2 : any[] >series.data.map(function (d: string) { return d; }) : string[] ->series.data.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>series.data.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >series.data : string[] >series : Series >data : string[] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >function (d: string) { return d; } : (d: string) => string >d : string >d : string diff --git a/tests/baselines/reference/staticAnonymousTypeNotReferencingTypeParameter.types b/tests/baselines/reference/staticAnonymousTypeNotReferencingTypeParameter.types index 127a8d930c5..610153ae191 100644 --- a/tests/baselines/reference/staticAnonymousTypeNotReferencingTypeParameter.types +++ b/tests/baselines/reference/staticAnonymousTypeNotReferencingTypeParameter.types @@ -39,9 +39,9 @@ class ListWrapper2 { >T : T >T : T >array.slice(0) : T[] ->array.slice : (start?: number, end?: number) => T[] +>array.slice : (this: readonly, start?: number, end?: number) => T[] >array : T[] ->slice : (start?: number, end?: number) => T[] +>slice : (this: readonly, start?: number, end?: number) => T[] >0 : 0 static reversed(dit: typeof ListWrapper2, array: T[]): T[] { @@ -168,9 +168,9 @@ class ListWrapper { >T : T >T : T >array.slice(0) : T[] ->array.slice : (start?: number, end?: number) => T[] +>array.slice : (this: readonly, start?: number, end?: number) => T[] >array : T[] ->slice : (start?: number, end?: number) => T[] +>slice : (this: readonly, start?: number, end?: number) => T[] >0 : 0 static forEachWithIndex(dit: typeof ListWrapper, array: T[], fn: (t: T, n: number) => void) { @@ -267,9 +267,9 @@ class ListWrapper { return array.indexOf(value, startIndex); >array.indexOf(value, startIndex) : number ->array.indexOf : (searchElement: T, fromIndex?: number) => number +>array.indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >array : T[] ->indexOf : (searchElement: T, fromIndex?: number) => number +>indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >value : T >startIndex : number } @@ -284,9 +284,9 @@ class ListWrapper { >T : T >list.indexOf(el) !== -1 : boolean >list.indexOf(el) : number ->list.indexOf : (searchElement: T, fromIndex?: number) => number +>list.indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >list : T[] ->indexOf : (searchElement: T, fromIndex?: number) => number +>indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >el : T >-1 : -1 >1 : 1 @@ -348,9 +348,9 @@ class ListWrapper { >a : any[] >b : any[] >a.concat(b) : any[] ->a.concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } +>a.concat : { (this: readonly, ...items: any[][]): any[]; (this: readonly, ...items: any[]): any[]; } >a : any[] ->concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } +>concat : { (this: readonly, ...items: any[][]): any[]; (this: readonly, ...items: any[]): any[]; } >b : any[] static insert(dit: typeof ListWrapper, list: T[], index: number, value: T) { list.splice(index, 0, value); } @@ -422,9 +422,9 @@ class ListWrapper { var index = list.indexOf(items[i]); >index : number >list.indexOf(items[i]) : number ->list.indexOf : (searchElement: T, fromIndex?: number) => number +>list.indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >list : T[] ->indexOf : (searchElement: T, fromIndex?: number) => number +>indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >items[i] : T >items : T[] >i : number @@ -451,9 +451,9 @@ class ListWrapper { var index = list.indexOf(el); >index : number >list.indexOf(el) : number ->list.indexOf : (searchElement: T, fromIndex?: number) => number +>list.indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >list : T[] ->indexOf : (searchElement: T, fromIndex?: number) => number +>indexOf : (this: readonly, searchElement: T, fromIndex?: number) => number >el : T if (index > -1) { @@ -581,9 +581,9 @@ class ListWrapper { return l.slice(from, to === null ? undefined : to); >l.slice(from, to === null ? undefined : to) : T[] ->l.slice : (start?: number, end?: number) => T[] +>l.slice : (this: readonly, start?: number, end?: number) => T[] >l : T[] ->slice : (start?: number, end?: number) => T[] +>slice : (this: readonly, start?: number, end?: number) => T[] >from : number >to === null ? undefined : to : number >to === null : boolean @@ -650,9 +650,9 @@ class ListWrapper { >l : T[] >T : T >l.toString() : string ->l.toString : () => string +>l.toString : (this: readonly) => string >l : T[] ->toString : () => string +>toString : (this: readonly) => string static toJSON(dit: typeof ListWrapper, l: T[]): string { return JSON.stringify(l); } >toJSON : (dit: typeof ListWrapper, l: T[]) => string diff --git a/tests/baselines/reference/targetTypeArgs.types b/tests/baselines/reference/targetTypeArgs.types index 84985316aa2..e472762f285 100644 --- a/tests/baselines/reference/targetTypeArgs.types +++ b/tests/baselines/reference/targetTypeArgs.types @@ -19,10 +19,10 @@ foo(function(x) { x }); [1].forEach(function(v,i,a) { v }); >[1].forEach(function(v,i,a) { v }) : void ->[1].forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>[1].forEach : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void >[1] : number[] >1 : 1 ->forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void >function(v,i,a) { v } : (v: number, i: number, a: number[]) => void >v : number >i : number @@ -31,10 +31,10 @@ foo(function(x) { x }); ["hello"].every(function(v,i,a) {return true;}); >["hello"].every(function(v,i,a) {return true;}) : boolean ->["hello"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>["hello"].every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >["hello"] : string[] >"hello" : "hello" ->every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => true >v : string >i : number @@ -43,10 +43,10 @@ foo(function(x) { x }); [1].every(function(v,i,a) {return true;}); >[1].every(function(v,i,a) {return true;}) : boolean ->[1].every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>[1].every : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >[1] : number[] >1 : 1 ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >function(v,i,a) {return true;} : (v: number, i: number, a: number[]) => true >v : number >i : number @@ -55,10 +55,10 @@ foo(function(x) { x }); [1].every(function(v,i,a) {return true;}); >[1].every(function(v,i,a) {return true;}) : boolean ->[1].every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>[1].every : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >[1] : number[] >1 : 1 ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean >function(v,i,a) {return true;} : (v: number, i: number, a: number[]) => true >v : number >i : number @@ -67,10 +67,10 @@ foo(function(x) { x }); ["s"].every(function(v,i,a) {return true;}); >["s"].every(function(v,i,a) {return true;}) : boolean ->["s"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>["s"].every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >["s"] : string[] >"s" : "s" ->every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => true >v : string >i : number @@ -79,10 +79,10 @@ foo(function(x) { x }); ["s"].forEach(function(v,i,a) { v }); >["s"].forEach(function(v,i,a) { v }) : void ->["s"].forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>["s"].forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >["s"] : string[] >"s" : "s" ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function(v,i,a) { v } : (v: string, i: number, a: string[]) => void >v : string >i : number diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.types b/tests/baselines/reference/targetTypeObjectLiteralToAny.types index 1dd81b33603..567fee47892 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.types +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.types @@ -10,9 +10,9 @@ function suggest(){ TypeScriptKeywords.forEach(function(keyword) { >TypeScriptKeywords.forEach(function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any }) : void ->TypeScriptKeywords.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>TypeScriptKeywords.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >TypeScriptKeywords : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any } : (keyword: string) => void >keyword : string diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types index fecae87d4b1..6575ed3545d 100644 --- a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types +++ b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types @@ -24,9 +24,9 @@ class A { } options.forEach(function (item) { >options.forEach(function (item) { this.options.push(item); }, this) : void ->options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function (item) { this.options.push(item); } : (item: string) => void >item : string @@ -57,9 +57,9 @@ class A { options.forEach(function () { >options.forEach(function () { undefinedArr.push(this); }) : void ->options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function () { undefinedArr.push(this); } : () => void undefinedArr.push(this); @@ -72,9 +72,9 @@ class A { }); // case1 options.forEach(function () { >options.forEach(function () { undefinedArr.push(this); }, undefined) : void ->options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function () { undefinedArr.push(this); } : () => void undefinedArr.push(this); @@ -89,9 +89,9 @@ class A { options.forEach(function () { >options.forEach(function () { undefinedArr.push(this); }, null) : void ->options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function () { undefinedArr.push(this); } : () => void undefinedArr.push(this); @@ -216,9 +216,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -237,9 +237,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >options : string[] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: string, index: number) => any >val : string >index : number @@ -265,9 +265,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -286,9 +286,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : string[] ->options.filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } +>options.filter : { (this: readonly, callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } >options : string[] ->filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } +>filter : { (this: readonly, callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -307,9 +307,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -441,9 +441,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >options : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -462,9 +462,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >options : string[] ->map : (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: string, index: number) => any >val : string >index : number @@ -490,9 +490,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->some : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -511,9 +511,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : string[] ->options.filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } +>options.filter : { (this: readonly, callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } >options : string[] ->filter : { (callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } +>filter : { (this: readonly, callbackfn: (value: string, index: number, array: string[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: string, index: number, array: string[]) => any, thisArg?: any): string[]; } >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -532,9 +532,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >options : string[] ->every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: string, index: number) => boolean >val : string >index : number @@ -613,9 +613,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => void, thisArg?: any) => void >options : Int8Array[] ->forEach : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number @@ -634,9 +634,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => U, thisArg?: any) => U[] >options : Int8Array[] ->map : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Int8Array, index: number) => any >val : Int8Array >index : number @@ -662,9 +662,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean >options : Int8Array[] ->some : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number @@ -683,9 +683,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Int8Array[] ->options.filter : { (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => any, thisArg?: any): Int8Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => any, thisArg?: any): Int8Array[]; } >options : Int8Array[] ->filter : { (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => any, thisArg?: any): Int8Array[]; } +>filter : { (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => any, thisArg?: any): Int8Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number @@ -704,9 +704,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean >options : Int8Array[] ->every : (callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Int8Array, index: number) => boolean >val : Int8Array >index : number @@ -785,9 +785,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg?: any) => void >options : Uint8Array[] ->forEach : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number @@ -806,9 +806,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg?: any) => U[] >options : Uint8Array[] ->map : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint8Array, index: number) => any >val : Uint8Array >index : number @@ -834,9 +834,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean >options : Uint8Array[] ->some : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number @@ -855,9 +855,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8Array[] ->options.filter : { (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg?: any): Uint8Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg?: any): Uint8Array[]; } >options : Uint8Array[] ->filter : { (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg?: any): Uint8Array[]; } +>filter : { (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg?: any): Uint8Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number @@ -876,9 +876,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean >options : Uint8Array[] ->every : (callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint8Array, index: number) => boolean >val : Uint8Array >index : number @@ -957,9 +957,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => void, thisArg?: any) => void >options : Float32Array[] ->forEach : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number @@ -978,9 +978,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => U, thisArg?: any) => U[] >options : Float32Array[] ->map : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Float32Array, index: number) => any >val : Float32Array >index : number @@ -1006,9 +1006,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean >options : Float32Array[] ->some : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number @@ -1027,9 +1027,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Float32Array[] ->options.filter : { (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => any, thisArg?: any): Float32Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => any, thisArg?: any): Float32Array[]; } >options : Float32Array[] ->filter : { (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => any, thisArg?: any): Float32Array[]; } +>filter : { (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => any, thisArg?: any): Float32Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number @@ -1048,9 +1048,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean >options : Float32Array[] ->every : (callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Float32Array, index: number) => boolean >val : Float32Array >index : number @@ -1129,9 +1129,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg?: any) => void >options : Uint8ClampedArray[] ->forEach : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number @@ -1150,9 +1150,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg?: any) => U[] >options : Uint8ClampedArray[] ->map : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint8ClampedArray, index: number) => any >val : Uint8ClampedArray >index : number @@ -1178,9 +1178,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean >options : Uint8ClampedArray[] ->some : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number @@ -1199,9 +1199,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8ClampedArray[] ->options.filter : { (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg?: any): Uint8ClampedArray[]; } +>options.filter : { (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg?: any): Uint8ClampedArray[]; } >options : Uint8ClampedArray[] ->filter : { (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg?: any): Uint8ClampedArray[]; } +>filter : { (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg?: any): Uint8ClampedArray[]; } >function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number @@ -1220,9 +1220,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean >options : Uint8ClampedArray[] ->every : (callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint8ClampedArray, index: number) => boolean >val : Uint8ClampedArray >index : number @@ -1301,9 +1301,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => void, thisArg?: any) => void >options : Int16Array[] ->forEach : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number @@ -1322,9 +1322,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => U, thisArg?: any) => U[] >options : Int16Array[] ->map : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Int16Array, index: number) => any >val : Int16Array >index : number @@ -1350,9 +1350,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean >options : Int16Array[] ->some : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number @@ -1371,9 +1371,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Int16Array[] ->options.filter : { (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => any, thisArg?: any): Int16Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => any, thisArg?: any): Int16Array[]; } >options : Int16Array[] ->filter : { (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => any, thisArg?: any): Int16Array[]; } +>filter : { (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => any, thisArg?: any): Int16Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number @@ -1392,9 +1392,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean >options : Int16Array[] ->every : (callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Int16Array, index: number) => boolean >val : Int16Array >index : number @@ -1473,9 +1473,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg?: any) => void >options : Uint16Array[] ->forEach : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number @@ -1494,9 +1494,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg?: any) => U[] >options : Uint16Array[] ->map : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint16Array, index: number) => any >val : Uint16Array >index : number @@ -1522,9 +1522,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean >options : Uint16Array[] ->some : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number @@ -1543,9 +1543,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint16Array[] ->options.filter : { (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg?: any): Uint16Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg?: any): Uint16Array[]; } >options : Uint16Array[] ->filter : { (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg?: any): Uint16Array[]; } +>filter : { (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg?: any): Uint16Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number @@ -1564,9 +1564,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean >options : Uint16Array[] ->every : (callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint16Array, index: number) => boolean >val : Uint16Array >index : number @@ -1645,9 +1645,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg?: any) => void >options : Uint32Array[] ->forEach : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number @@ -1666,9 +1666,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg?: any) => U[] >options : Uint32Array[] ->map : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Uint32Array, index: number) => any >val : Uint32Array >index : number @@ -1694,9 +1694,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean >options : Uint32Array[] ->some : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number @@ -1715,9 +1715,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint32Array[] ->options.filter : { (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg?: any): Uint32Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg?: any): Uint32Array[]; } >options : Uint32Array[] ->filter : { (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg?: any): Uint32Array[]; } +>filter : { (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg?: any): Uint32Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number @@ -1736,9 +1736,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean >options : Uint32Array[] ->every : (callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Uint32Array, index: number) => boolean >val : Uint32Array >index : number @@ -1817,9 +1817,9 @@ class A { options.forEach(function (val, index) { >options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void ->options.forEach : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => void, thisArg?: any) => void +>options.forEach : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => void, thisArg?: any) => void >options : Float64Array[] ->forEach : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => void, thisArg?: any) => void +>forEach : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => void, thisArg?: any) => void >function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number @@ -1838,9 +1838,9 @@ class A { options.map(function (val, index) { >options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : any[] ->options.map : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => U, thisArg?: any) => U[] +>options.map : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => U, thisArg?: any) => U[] >options : Float64Array[] ->map : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => U, thisArg?: any) => U[] >function (val, index) { if (val === this.options[index]) return this.options[index]; } : (val: Float64Array, index: number) => any >val : Float64Array >index : number @@ -1866,9 +1866,9 @@ class A { options.some(function (val, index) { >options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.some : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean +>options.some : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean >options : Float64Array[] ->some : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean +>some : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number @@ -1887,9 +1887,9 @@ class A { options.filter(function (val, index) { >options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Float64Array[] ->options.filter : { (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => any, thisArg?: any): Float64Array[]; } +>options.filter : { (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => any, thisArg?: any): Float64Array[]; } >options : Float64Array[] ->filter : { (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => value is S, thisArg?: any): S[]; (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => any, thisArg?: any): Float64Array[]; } +>filter : { (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => value is S, thisArg?: any): S[]; (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => any, thisArg?: any): Float64Array[]; } >function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number @@ -1908,9 +1908,9 @@ class A { options.every(function (val, index) { >options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean ->options.every : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean +>options.every : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean >options : Float64Array[] ->every : (callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean +>every : (this: readonly, callbackfn: (value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg?: any) => boolean >function (val, index) { return val === this.options[index]; } : (val: Float64Array, index: number) => boolean >val : Float64Array >index : number diff --git a/tests/baselines/reference/thisTypeInTuples.types b/tests/baselines/reference/thisTypeInTuples.types index 3b6f995840e..1abf1ea65d9 100644 --- a/tests/baselines/reference/thisTypeInTuples.types +++ b/tests/baselines/reference/thisTypeInTuples.types @@ -4,7 +4,7 @@ interface Array { >T : T slice(): this; ->slice : { (start?: number, end?: number): T[]; (): this; } +>slice : { (this: readonly, start?: number, end?: number): T[]; (): this; } } let t: [number, string] = [42, "hello"]; @@ -16,24 +16,24 @@ let t: [number, string] = [42, "hello"]; let a = t.slice(); >a : [number, string] >t.slice() : [number, string] ->t.slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } +>t.slice : { (this: readonly, start?: number, end?: number): (string | number)[]; (): [number, string]; } >t : [number, string] ->slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } +>slice : { (this: readonly, start?: number, end?: number): (string | number)[]; (): [number, string]; } let b = t.slice(1); >b : (string | number)[] >t.slice(1) : (string | number)[] ->t.slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } +>t.slice : { (this: readonly, start?: number, end?: number): (string | number)[]; (): [number, string]; } >t : [number, string] ->slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } +>slice : { (this: readonly, start?: number, end?: number): (string | number)[]; (): [number, string]; } >1 : 1 let c = t.slice(0, 1); >c : (string | number)[] >t.slice(0, 1) : (string | number)[] ->t.slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } +>t.slice : { (this: readonly, start?: number, end?: number): (string | number)[]; (): [number, string]; } >t : [number, string] ->slice : { (start?: number, end?: number): (string | number)[]; (): [number, string]; } +>slice : { (this: readonly, start?: number, end?: number): (string | number)[]; (): [number, string]; } >0 : 0 >1 : 1 diff --git a/tests/baselines/reference/tsxSpreadChildren.types b/tests/baselines/reference/tsxSpreadChildren.types index 4a66e908c49..7d6a957d2a4 100644 --- a/tests/baselines/reference/tsxSpreadChildren.types +++ b/tests/baselines/reference/tsxSpreadChildren.types @@ -63,9 +63,9 @@ function TodoList({ todos }: TodoListProps) { {...todos.map(todo => )} >todos.map(todo => ) : JSX.Element[] ->todos.map : (callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any) => U[] +>todos.map : (this: readonly, callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any) => U[] >todos : TodoProp[] ->map : (callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any) => U[] >todo => : (todo: TodoProp) => JSX.Element >todo : TodoProp > : JSX.Element diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types index 5269bd9b518..80b05c5dece 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types @@ -16,9 +16,9 @@ var nodes: TreeNode[]; nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : (callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any) => U[] +>nodes.map : (this: readonly, callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any) => U[] >nodes : TreeNode[] ->map : (callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any) => U[] >n => n.name : (n: TreeNode) => string >n : TreeNode >n.name : string diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types index 59244850849..c27154963bb 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types @@ -27,9 +27,9 @@ var nodes: TreeNodeMiddleman[]; nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any) => U[] +>nodes.map : (this: readonly, callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any) => U[] >nodes : TreeNodeMiddleman[] ->map : (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any) => U[] +>map : (this: readonly, callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any) => U[] >n => n.name : (n: TreeNodeMiddleman) => string >n : TreeNodeMiddleman >n.name : string diff --git a/tests/baselines/reference/typeGuardsOnClassProperty.types b/tests/baselines/reference/typeGuardsOnClassProperty.types index f4c3542344f..ac7c90748cc 100644 --- a/tests/baselines/reference/typeGuardsOnClassProperty.types +++ b/tests/baselines/reference/typeGuardsOnClassProperty.types @@ -27,9 +27,9 @@ class D { >"string" : "string" >data : string >data.join(" ") : string ->data.join : (separator?: string) => string +>data.join : (this: readonly, separator?: string) => string >data : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >" " : " " } @@ -48,11 +48,11 @@ class D { >this : this >data : string >this.data.join(" ") : string ->this.data.join : (separator?: string) => string +>this.data.join : (this: readonly, separator?: string) => string >this.data : string[] >this : this >data : string[] ->join : (separator?: string) => string +>join : (this: readonly, separator?: string) => string >" " : " " } }