diff --git a/_submodules/TypeScript b/_submodules/TypeScript index c356203d2b..6758cd9f01 160000 --- a/_submodules/TypeScript +++ b/_submodules/TypeScript @@ -1 +1 @@ -Subproject commit c356203d2bd5bf9edf0012d179128a02f74b7bf3 +Subproject commit 6758cd9f01a716e69f1ddeddb23faa13a8ff2507 diff --git a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff index 23d299c30c..1e94053bb7 100644 --- a/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff +++ b/testdata/baselines/reference/submodule/compiler/correlatedUnions.types.diff @@ -141,23 +141,4 @@ +>< K extends KeyOfOriginal, N extends NestedKeyOfOriginalFor>( original: Original, mappedFromOriginal: MappedFromOriginal, key: K, nestedKey: N): [Original[K][N], MappedFromOriginal[K][N]] => { return [original[key][nestedKey], mappedFromOriginal[key][nestedKey]];} : (original: Original, mappedFromOriginal: SameKeys, key: K, nestedKey: N) => [Original[K][N], SameKeys[K][N]] K extends KeyOfOriginal, - N extends NestedKeyOfOriginalFor -@@= skipped -63, +63 lines =@@ - >key : T - - const assertedCheck = userValue ? userValue! : defaultValue; -->assertedCheck : NonNullable[T]> -->userValue ? userValue! : defaultValue : NonNullable[T]> -+>assertedCheck : Config[T] -+>userValue ? userValue! : defaultValue : Config[T] - >userValue : Partial[T] - >userValue! : NonNullable[T]> - >userValue : NonNullable[T]> - >defaultValue : Config[T] - - return assertedCheck; -->assertedCheck : NonNullable[T]> -+>assertedCheck : Config[T] - } - - // repro from #47523 \ No newline at end of file + N extends NestedKeyOfOriginalFor \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/objectLiteralExcessProperties.types.diff b/testdata/baselines/reference/submodule/compiler/objectLiteralExcessProperties.types.diff index ebfd5a47ca..16cea5d93a 100644 --- a/testdata/baselines/reference/submodule/compiler/objectLiteralExcessProperties.types.diff +++ b/testdata/baselines/reference/submodule/compiler/objectLiteralExcessProperties.types.diff @@ -17,13 +17,4 @@ +>obj4 : { name: string; } | T & { prop: boolean; } >prop : boolean >name : string - >{ name: "test", prop: true } : { name: string; prop: boolean; } -@@= skipped -11, +11 lines =@@ - - // No excess property checks when union includes 'object' type - const obj5: object | { x: string } = { z: 'abc' } -->obj5 : { x: string; } | object -+>obj5 : object | { x: string; } - >x : string - >{ z: 'abc' } : { z: string; } - >z : string \ No newline at end of file + >{ name: "test", prop: true } : { name: string; prop: boolean; } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/typeGuardConstructorClassAndNumber.types.diff b/testdata/baselines/reference/submodule/compiler/typeGuardConstructorClassAndNumber.types.diff index 27fb073af6..e6465d113f 100644 --- a/testdata/baselines/reference/submodule/compiler/typeGuardConstructorClassAndNumber.types.diff +++ b/testdata/baselines/reference/submodule/compiler/typeGuardConstructorClassAndNumber.types.diff @@ -5,15 +5,7 @@ function foo(instance: Function | object) { ->foo : (instance: Function | object) => number -->instance : Function | object +>foo : (instance: object | Function) => number -+>instance : object | Function + >instance : object | Function - if (typeof instance === 'function') { - >typeof instance === 'function' : boolean - >typeof instance : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" -->instance : Function | object -+>instance : object | Function - >'function' : "function" - - if (instance.prototype == null || instance.prototype.constructor == null) { \ No newline at end of file + if (typeof instance === 'function') { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/unionOfFunctionAndSignatureIsCallable.types.diff b/testdata/baselines/reference/submodule/compiler/unionOfFunctionAndSignatureIsCallable.types.diff index a88707ecaf..d83c18ae6c 100644 --- a/testdata/baselines/reference/submodule/compiler/unionOfFunctionAndSignatureIsCallable.types.diff +++ b/testdata/baselines/reference/submodule/compiler/unionOfFunctionAndSignatureIsCallable.types.diff @@ -20,10 +20,8 @@ >callable : Function | (() => object) } - function f2(fetcherParams: object | (() => object)) { - >f2 : (fetcherParams: object | (() => object)) => void -->fetcherParams : (() => object) | object -+>fetcherParams : object | (() => object) +@@= skipped -10, +10 lines =@@ + >fetcherParams : object | (() => object) const data = typeof fetcherParams === 'function' ->data : error @@ -32,8 +30,7 @@ +>typeof fetcherParams === 'function' ? fetcherParams() : fetcherParams : any >typeof fetcherParams === 'function' : boolean >typeof fetcherParams : "bigint" | "boolean" | "function" | "number" | "object" | "string" | "symbol" | "undefined" -->fetcherParams : (() => object) | object -+>fetcherParams : object | (() => object) + >fetcherParams : object | (() => object) >'function' : "function" ? fetcherParams() diff --git a/testdata/baselines/reference/submodule/compiler/vueLikeDataAndPropsInference2.types.diff b/testdata/baselines/reference/submodule/compiler/vueLikeDataAndPropsInference2.types.diff index beb4d294c7..7eeca50fc1 100644 --- a/testdata/baselines/reference/submodule/compiler/vueLikeDataAndPropsInference2.types.diff +++ b/testdata/baselines/reference/submodule/compiler/vueLikeDataAndPropsInference2.types.diff @@ -10,9 +10,8 @@ declare function test(fn: Options): void; ->test : { (fn: ThisTypedOptions): void; (fn: Options): void; } -->fn : Options<((this: Instance) => object) | object, PropsDefinition>> +>test : { (fn: ThisTypedOptions): void; (fn: Options object), PropsDefinition>>): void; } -+>fn : Options object), PropsDefinition>> + >fn : Options object), PropsDefinition>> test({ >test({ props: { foo: '' }, data(): { bar: boolean } { return { bar: true } }, watch: { foo(newVal: string, oldVal: string): void { this.bar = false } }}) : void diff --git a/testdata/baselines/reference/submodule/conformance/conditionalTypes2.types.diff b/testdata/baselines/reference/submodule/conformance/conditionalTypes2.types.diff index 276c5aa2c2..a1d7609b69 100644 --- a/testdata/baselines/reference/submodule/conformance/conditionalTypes2.types.diff +++ b/testdata/baselines/reference/submodule/conformance/conditionalTypes2.types.diff @@ -9,16 +9,7 @@ >predicate : (v: T) => boolean >v : T -@@= skipped -29, +29 lines =@@ - - declare function toString1(value: object | Function): string ; - >toString1 : (value: object | Function) => string -->value : Function | object -+>value : object | Function - - declare function toString2(value: Function): string ; - >toString2 : (value: Function) => string -@@= skipped -173, +173 lines =@@ +@@= skipped -202, +202 lines =@@ // Repro from #33568 declare function save(_response: IRootResponse): void; diff --git a/testdata/baselines/reference/submodule/conformance/generatorYieldContextualType.types.diff b/testdata/baselines/reference/submodule/conformance/generatorYieldContextualType.types.diff index 231e317d4c..ca7da0060c 100644 --- a/testdata/baselines/reference/submodule/conformance/generatorYieldContextualType.types.diff +++ b/testdata/baselines/reference/submodule/conformance/generatorYieldContextualType.types.diff @@ -46,16 +46,7 @@ _step: T, >_step : T -@@= skipped -9, +9 lines =@@ - >_state : PartialStepState - - _selection: StepItemType | Directive -->_selection : Directive | StepItemType -+>_selection : StepItemType | Directive - - ): _selection is StepItemType { - return false; -@@= skipped -19, +19 lines =@@ +@@= skipped -28, +28 lines =@@ } function* showStep< diff --git a/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.errors.txt.diff deleted file mode 100644 index db953e8336..0000000000 --- a/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.inOperatorWithValidOperands.errors.txt -+++ new.inOperatorWithValidOperands.errors.txt -@@= skipped -0, +0 lines =@@ - inOperatorWithValidOperands.ts(26,20): error TS2322: Type 'T' is not assignable to type 'object'. - inOperatorWithValidOperands.ts(30,20): error TS2322: Type 'T | U' is not assignable to type 'object'. - Type 'T' is not assignable to type 'object'. --inOperatorWithValidOperands.ts(34,20): error TS2322: Type 'T | object' is not assignable to type 'object'. -+inOperatorWithValidOperands.ts(34,20): error TS2322: Type 'object | T' is not assignable to type 'object'. - Type 'T' is not assignable to type 'object'. - - -@@= skipped -47, +47 lines =@@ - function unionCase2(t: T | object) { - var rb5 = x in t; - ~ --!!! error TS2322: Type 'T | object' is not assignable to type 'object'. -+!!! error TS2322: Type 'object | T' is not assignable to type 'object'. - !!! error TS2322: Type 'T' is not assignable to type 'object'. - !!! related TS2208 inOperatorWithValidOperands.ts:33:21: This type parameter might need an `extends object` constraint. - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.types.diff b/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.types.diff index 5fc7f20707..81704ff525 100644 --- a/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.types.diff +++ b/testdata/baselines/reference/submodule/conformance/inOperatorWithValidOperands.types.diff @@ -5,16 +5,7 @@ function unionCase2(t: T | object) { ->unionCase2 : (t: T | object) => void -->t : T | object +>unionCase2 : (t: object | T) => void -+>t : object | T + >t : object | T - var rb5 = x in t; - >rb5 : boolean - >x in t : boolean - >x : any -->t : T | object -+>t : object | T - } - - interface X { x: number } \ No newline at end of file + var rb5 = x in t; \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveAndTypeVariables.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/nonPrimitiveAndTypeVariables.errors.txt.diff deleted file mode 100644 index c31a26f2e1..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveAndTypeVariables.errors.txt.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- old.nonPrimitiveAndTypeVariables.errors.txt -+++ new.nonPrimitiveAndTypeVariables.errors.txt -@@= skipped -0, +0 lines =@@ - nonPrimitiveAndTypeVariables.ts(10,9): error TS2322: Type 'T' is not assignable to type 'object'. --nonPrimitiveAndTypeVariables.ts(11,9): error TS2322: Type 'T' is not assignable to type 'U | object'. -+nonPrimitiveAndTypeVariables.ts(11,9): error TS2322: Type 'T' is not assignable to type 'object | U'. - - - ==== nonPrimitiveAndTypeVariables.ts (2 errors) ==== -@@= skipped -17, +17 lines =@@ - !!! related TS2208 nonPrimitiveAndTypeVariables.ts:9:14: This type parameter might need an `extends object` constraint. - let b: U | object = x; // Error - ~ --!!! error TS2322: Type 'T' is not assignable to type 'U | object'. --!!! related TS2208 nonPrimitiveAndTypeVariables.ts:9:14: This type parameter might need an `extends U | object` constraint. -+!!! error TS2322: Type 'T' is not assignable to type 'object | U'. -+!!! related TS2208 nonPrimitiveAndTypeVariables.ts:9:14: This type parameter might need an `extends object | U` constraint. - } - \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/nonPrimitiveAndTypeVariables.types.diff b/testdata/baselines/reference/submodule/conformance/nonPrimitiveAndTypeVariables.types.diff deleted file mode 100644 index 234342215b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/nonPrimitiveAndTypeVariables.types.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- old.nonPrimitiveAndTypeVariables.types -+++ new.nonPrimitiveAndTypeVariables.types -@@= skipped -31, +31 lines =@@ - >x : T - - let b: U | object = x; // Error -->b : U | object -+>b : object | U - >x : T - } diff --git a/testdata/baselines/reference/submodule/conformance/spreadObjectOrFalsy.types.diff b/testdata/baselines/reference/submodule/conformance/spreadObjectOrFalsy.types.diff index c53237d855..9e6404ed0e 100644 --- a/testdata/baselines/reference/submodule/conformance/spreadObjectOrFalsy.types.diff +++ b/testdata/baselines/reference/submodule/conformance/spreadObjectOrFalsy.types.diff @@ -17,21 +17,7 @@ } function f3(a: T) { -@@= skipped -19, +19 lines =@@ - - function f4(a: object | T) { - >f4 : (a: object | T) => {} -->a : T | object -+>a : object | T - - return { ...a }; - >{ ...a } : {} -->a : T | object -+>a : object | T - } - - function f5(a: S | T) { -@@= skipped -28, +28 lines =@@ +@@= skipped -47, +47 lines =@@ // Repro from #46976 function g1(a: A) { diff --git a/testdata/baselines/reference/submodule/conformance/templateLiteralTypes3.types.diff b/testdata/baselines/reference/submodule/conformance/templateLiteralTypes3.types.diff index a80b9d28ec..e3c5a47fed 100644 --- a/testdata/baselines/reference/submodule/conformance/templateLiteralTypes3.types.diff +++ b/testdata/baselines/reference/submodule/conformance/templateLiteralTypes3.types.diff @@ -111,18 +111,18 @@ >id : string let x: keyof T & string | `-${keyof T & string}`; -->x : (keyof T & string) | `-${keyof T & string}` +->x : `-${keyof T & string}` | (keyof T & string) +>x : `-${keyof T & string}` | keyof T & string x = "id"; >x = "id" : "id" -->x : (keyof T & string) | `-${keyof T & string}` +->x : `-${keyof T & string}` | (keyof T & string) +>x : `-${keyof T & string}` | keyof T & string >"id" : "id" x = "-id"; >x = "-id" : "-id" -->x : (keyof T & string) | `-${keyof T & string}` +->x : `-${keyof T & string}` | (keyof T & string) +>x : `-${keyof T & string}` | keyof T & string >"-id" : "-id" }