From 9749ecc2d53c9b7c788cb8ba7ddb0c921dc23baf Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 31 Oct 2025 14:45:03 -0700 Subject: [PATCH 1/2] Update submodule --- _submodules/TypeScript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_submodules/TypeScript b/_submodules/TypeScript index 763d8821ca..9e8eaa1746 160000 --- a/_submodules/TypeScript +++ b/_submodules/TypeScript @@ -1 +1 @@ -Subproject commit 763d8821ca3fe9277eab23f82640425f7222ddd4 +Subproject commit 9e8eaa1746b0d09c3cd29048126ef9cf24f29c03 From 748df6b189d53868d05331b54006c9be6e302f07 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 31 Oct 2025 14:51:03 -0700 Subject: [PATCH 2/2] Update baselines --- .../arrayAssignmentTest1.errors.txt.diff | 45 ---------------- ...rainedToOtherTypeParameter.errors.txt.diff | 16 ------ ...itClassExpressionInDeclarationFile.js.diff | 22 +------- .../compiler/variancePropagation.errors.txt | 29 ++++++++++ .../variancePropagation.errors.txt.diff | 33 ++++++++++++ .../compiler/variancePropagation.symbols | 50 +++++++++++++++++ .../compiler/variancePropagation.types | 34 ++++++++++++ ...tCompatWithCallSignatures3.errors.txt.diff | 7 +-- ...atWithConstructSignatures3.errors.txt.diff | 7 +-- ...ntCompatWithNumericIndexer.errors.txt.diff | 38 ------------- ...tCompatWithNumericIndexer2.errors.txt.diff | 38 ------------- ...entCompatWithStringIndexer.errors.txt.diff | 53 ------------------- ...ntCompatWithStringIndexer2.errors.txt.diff | 53 ------------------- ...ExtendingClassWithPrivates.errors.txt.diff | 18 ------- ...tendingClassWithProtecteds.errors.txt.diff | 18 ------- .../invalidReturnStatements.errors.txt.diff | 20 ------- .../typeAssertions.errors.txt.diff | 20 ------- .../jsdocTypeTagCast.errors.txt.diff | 21 ++------ 18 files changed, 154 insertions(+), 368 deletions(-) delete mode 100644 testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt create mode 100644 testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt.diff create mode 100644 testdata/baselines/reference/submodule/compiler/variancePropagation.symbols create mode 100644 testdata/baselines/reference/submodule/compiler/variancePropagation.types delete mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer2.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithPrivates.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/invalidReturnStatements.errors.txt.diff delete mode 100644 testdata/baselines/reference/submodule/conformance/typeAssertions.errors.txt.diff diff --git a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff deleted file mode 100644 index 00a9d051eb..0000000000 --- a/testdata/baselines/reference/submodule/compiler/arrayAssignmentTest1.errors.txt.diff +++ /dev/null @@ -1,45 +0,0 @@ ---- old.arrayAssignmentTest1.errors.txt -+++ new.arrayAssignmentTest1.errors.txt -@@= skipped -0, +0 lines =@@ - arrayAssignmentTest1.ts(46,5): error TS2741: Property 'IM1' is missing in type 'undefined[]' but required in type 'I1'. - arrayAssignmentTest1.ts(47,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 --arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1 -+arrayAssignmentTest1.ts(48,5): error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 - arrayAssignmentTest1.ts(49,5): error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. - arrayAssignmentTest1.ts(60,1): error TS2322: Type 'C3[]' is not assignable to type 'I1[]'. - Property 'IM1' is missing in type 'C3' but required in type 'I1'. -@@= skipped -10, +10 lines =@@ - arrayAssignmentTest1.ts(68,1): error TS2322: Type 'C1[]' is not assignable to type 'C2[]'. - Property 'C2M1' is missing in type 'C1' but required in type 'C2'. - arrayAssignmentTest1.ts(69,1): error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. -- Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1 -+ Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1 - arrayAssignmentTest1.ts(70,1): error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. -- Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1 -+ Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1 - arrayAssignmentTest1.ts(75,1): error TS2322: Type 'C2[]' is not assignable to type 'C3[]'. - Property 'CM3M1' is missing in type 'C2' but required in type 'C3'. - arrayAssignmentTest1.ts(76,1): error TS2322: Type 'C1[]' is not assignable to type 'C3[]'. -@@= skipped -72, +72 lines =@@ - !!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C1': IM1, C1M1 - var c2_error: C2 = []; // should be an error - is - ~~~~~~~~ --!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': IM1, C1M1, C2M1 -+!!! error TS2739: Type 'undefined[]' is missing the following properties from type 'C2': C2M1, IM1, C1M1 - var c3_error: C3 = []; // should be an error - is - ~~~~~~~~ - !!! error TS2741: Property 'CM3M1' is missing in type 'undefined[]' but required in type 'C3'. -@@= skipped -42, +42 lines =@@ - arr_c2 = arr_i1; // should be an error - subtype relationship - is - ~~~~~~ - !!! error TS2322: Type 'I1[]' is not assignable to type 'C2[]'. --!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C1M1, C2M1 -+!!! error TS2322: Type 'I1' is missing the following properties from type 'C2': C2M1, C1M1 - arr_c2 = arr_c3; // should be an error - is - ~~~~~~ - !!! error TS2322: Type 'C3[]' is not assignable to type 'C2[]'. --!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': IM1, C1M1, C2M1 -+!!! error TS2322: Type 'C3' is missing the following properties from type 'C2': C2M1, IM1, C1M1 - - // "clean up bug" occurs at this point - // if you move these three expressions to another file, they raise an error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff deleted file mode 100644 index cf03d78758..0000000000 --- a/testdata/baselines/reference/submodule/compiler/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt.diff +++ /dev/null @@ -1,16 +0,0 @@ ---- old.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt -+++ new.chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt -@@= skipped -0, +0 lines =@@ - chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,64): error TS2741: Property 'z' is missing in type 'B' but required in type 'C'. --chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': y, z -+chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts(19,81): error TS2739: Type 'A' is missing the following properties from type 'C': z, y - - - ==== chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts (2 errors) ==== -@@= skipped -26, +26 lines =@@ - !!! related TS2728 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:15:5: 'z' is declared here. - !!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. - ~~~~~ --!!! error TS2739: Type 'A' is missing the following properties from type 'C': y, z -+!!! error TS2739: Type 'A' is missing the following properties from type 'C': z, y - !!! related TS6502 chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.ts:3:27: The expected type comes from the return type of this signature. \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff index 0b51041b0e..93a883c6db 100644 --- a/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff +++ b/testdata/baselines/reference/submodule/compiler/emitClassExpressionInDeclarationFile.js.diff @@ -25,24 +25,4 @@ + tags(c: any): any; }; }; - export declare class FooItem { -@@= skipped -10, +10 lines =@@ - export type Constructor = new (...args: any[]) => T; - export declare function WithTags>(Base: T): { - new (...args: any[]): { -+ tags(): void; - foo(): void; - name?: string; -- tags(): void; - }; - getTags(): void; - } & T; - declare const Test_base: { - new (...args: any[]): { -+ tags(): void; - foo(): void; - name?: string; -- tags(): void; - }; - getTags(): void; - } & typeof FooItem; \ No newline at end of file + export declare class FooItem { \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt b/testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt new file mode 100644 index 0000000000..90d0a6c86d --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt @@ -0,0 +1,29 @@ +variancePropagation.ts(13,7): error TS2322: Type 'DerivedTable<{ base: Base; new: New; }>' is not assignable to type 'DerivedTable<{ base: Base; new: New & Base; }>'. + Type '{ base: Base; new: New; }' is not assignable to type '{ base: Base; new: New & Base; }'. + Types of property 'new' are incompatible. + Type 'New' is not assignable to type 'New & Base'. + Property 'baseProp' is missing in type 'New' but required in type 'Base'. + + +==== variancePropagation.ts (1 errors) ==== + // https://github.com/microsoft/TypeScript/issues/62606 + + interface DerivedTable { + // Error disappears when these property declarations are reversed + schema: S["base"] & S["new"] + readonlySchema: Readonly + } + + interface Base { baseProp: number; } + interface New { newProp: boolean; } + + declare const source: DerivedTable<{ base: Base, new: New }> + const destination: DerivedTable<{ base: Base; new: New & Base }> = source; // Error + ~~~~~~~~~~~ +!!! error TS2322: Type 'DerivedTable<{ base: Base; new: New; }>' is not assignable to type 'DerivedTable<{ base: Base; new: New & Base; }>'. +!!! error TS2322: Type '{ base: Base; new: New; }' is not assignable to type '{ base: Base; new: New & Base; }'. +!!! error TS2322: Types of property 'new' are incompatible. +!!! error TS2322: Type 'New' is not assignable to type 'New & Base'. +!!! error TS2322: Property 'baseProp' is missing in type 'New' but required in type 'Base'. +!!! related TS2728 variancePropagation.ts:9:18: 'baseProp' is declared here. + \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt.diff new file mode 100644 index 0000000000..a6579d94a7 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/variancePropagation.errors.txt.diff @@ -0,0 +1,33 @@ +--- old.variancePropagation.errors.txt ++++ new.variancePropagation.errors.txt +@@= skipped -0, +0 lines =@@ +- ++variancePropagation.ts(13,7): error TS2322: Type 'DerivedTable<{ base: Base; new: New; }>' is not assignable to type 'DerivedTable<{ base: Base; new: New & Base; }>'. ++ Type '{ base: Base; new: New; }' is not assignable to type '{ base: Base; new: New & Base; }'. ++ Types of property 'new' are incompatible. ++ Type 'New' is not assignable to type 'New & Base'. ++ Property 'baseProp' is missing in type 'New' but required in type 'Base'. ++ ++ ++==== variancePropagation.ts (1 errors) ==== ++ // https://github.com/microsoft/TypeScript/issues/62606 ++ ++ interface DerivedTable { ++ // Error disappears when these property declarations are reversed ++ schema: S["base"] & S["new"] ++ readonlySchema: Readonly ++ } ++ ++ interface Base { baseProp: number; } ++ interface New { newProp: boolean; } ++ ++ declare const source: DerivedTable<{ base: Base, new: New }> ++ const destination: DerivedTable<{ base: Base; new: New & Base }> = source; // Error ++ ~~~~~~~~~~~ ++!!! error TS2322: Type 'DerivedTable<{ base: Base; new: New; }>' is not assignable to type 'DerivedTable<{ base: Base; new: New & Base; }>'. ++!!! error TS2322: Type '{ base: Base; new: New; }' is not assignable to type '{ base: Base; new: New & Base; }'. ++!!! error TS2322: Types of property 'new' are incompatible. ++!!! error TS2322: Type 'New' is not assignable to type 'New & Base'. ++!!! error TS2322: Property 'baseProp' is missing in type 'New' but required in type 'Base'. ++!!! related TS2728 variancePropagation.ts:9:18: 'baseProp' is declared here. ++ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/compiler/variancePropagation.symbols b/testdata/baselines/reference/submodule/compiler/variancePropagation.symbols new file mode 100644 index 0000000000..1c138b4bcf --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/variancePropagation.symbols @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/variancePropagation.ts] //// + +=== variancePropagation.ts === +// https://github.com/microsoft/TypeScript/issues/62606 + +interface DerivedTable { +>DerivedTable : Symbol(DerivedTable, Decl(variancePropagation.ts, 0, 0)) +>S : Symbol(S, Decl(variancePropagation.ts, 2, 23)) +>base : Symbol(base, Decl(variancePropagation.ts, 2, 34)) +>new : Symbol(new, Decl(variancePropagation.ts, 2, 45)) + + // Error disappears when these property declarations are reversed + schema: S["base"] & S["new"] +>schema : Symbol(DerivedTable.schema, Decl(variancePropagation.ts, 2, 59)) +>S : Symbol(S, Decl(variancePropagation.ts, 2, 23)) +>S : Symbol(S, Decl(variancePropagation.ts, 2, 23)) + + readonlySchema: Readonly +>readonlySchema : Symbol(DerivedTable.readonlySchema, Decl(variancePropagation.ts, 4, 32)) +>Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) +>S : Symbol(S, Decl(variancePropagation.ts, 2, 23)) +>S : Symbol(S, Decl(variancePropagation.ts, 2, 23)) +} + +interface Base { baseProp: number; } +>Base : Symbol(Base, Decl(variancePropagation.ts, 6, 1)) +>baseProp : Symbol(Base.baseProp, Decl(variancePropagation.ts, 8, 16)) + +interface New { newProp: boolean; } +>New : Symbol(New, Decl(variancePropagation.ts, 8, 36)) +>newProp : Symbol(New.newProp, Decl(variancePropagation.ts, 9, 16)) + +declare const source: DerivedTable<{ base: Base, new: New }> +>source : Symbol(source, Decl(variancePropagation.ts, 11, 13)) +>DerivedTable : Symbol(DerivedTable, Decl(variancePropagation.ts, 0, 0)) +>base : Symbol(base, Decl(variancePropagation.ts, 11, 36)) +>Base : Symbol(Base, Decl(variancePropagation.ts, 6, 1)) +>new : Symbol(new, Decl(variancePropagation.ts, 11, 48)) +>New : Symbol(New, Decl(variancePropagation.ts, 8, 36)) + +const destination: DerivedTable<{ base: Base; new: New & Base }> = source; // Error +>destination : Symbol(destination, Decl(variancePropagation.ts, 12, 5)) +>DerivedTable : Symbol(DerivedTable, Decl(variancePropagation.ts, 0, 0)) +>base : Symbol(base, Decl(variancePropagation.ts, 12, 33)) +>Base : Symbol(Base, Decl(variancePropagation.ts, 6, 1)) +>new : Symbol(new, Decl(variancePropagation.ts, 12, 45)) +>New : Symbol(New, Decl(variancePropagation.ts, 8, 36)) +>Base : Symbol(Base, Decl(variancePropagation.ts, 6, 1)) +>source : Symbol(source, Decl(variancePropagation.ts, 11, 13)) + diff --git a/testdata/baselines/reference/submodule/compiler/variancePropagation.types b/testdata/baselines/reference/submodule/compiler/variancePropagation.types new file mode 100644 index 0000000000..a173eb5f94 --- /dev/null +++ b/testdata/baselines/reference/submodule/compiler/variancePropagation.types @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/variancePropagation.ts] //// + +=== variancePropagation.ts === +// https://github.com/microsoft/TypeScript/issues/62606 + +interface DerivedTable { +>base : any +>new : any + + // Error disappears when these property declarations are reversed + schema: S["base"] & S["new"] +>schema : S["base"] & S["new"] + + readonlySchema: Readonly +>readonlySchema : Readonly +} + +interface Base { baseProp: number; } +>baseProp : number + +interface New { newProp: boolean; } +>newProp : boolean + +declare const source: DerivedTable<{ base: Base, new: New }> +>source : DerivedTable<{ base: Base; new: New; }> +>base : Base +>new : New + +const destination: DerivedTable<{ base: Base; new: New & Base }> = source; // Error +>destination : DerivedTable<{ base: Base; new: New & Base; }> +>base : Base +>new : New & Base +>source : DerivedTable<{ base: Base; new: New; }> + diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithCallSignatures3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithCallSignatures3.errors.txt.diff index 02b5d803a4..07a1ad5dc2 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithCallSignatures3.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithCallSignatures3.errors.txt.diff @@ -9,9 +9,8 @@ Types of parameters 'y' and 'y' are incompatible. Type 'T' is not assignable to type 'Derived2[]'. Type 'Base[]' is not assignable to type 'Derived2[]'. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz + Type 'Base' is missing the following properties from type 'Derived2': baz, bar -assignmentCompatWithCallSignatures3.ts(83,1): error TS2322: Type '(x: Base[], y: Derived[]) => Derived[]' is not assignable to type '>(x: Base[], y: T) => T'. -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar +assignmentCompatWithCallSignatures3.ts(83,1): error TS2322: Type '(x: Base[], y: Derived[]) => Derived[]' is not assignable to type '(x: Base[], y: T) => T'. Type 'Derived[]' is not assignable to type 'T'. 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. @@ -25,9 +24,7 @@ !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'Derived2[]'. !!! error TS2322: Type 'Base[]' is not assignable to type 'Derived2[]'. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - var b13: >(x: Array, y: T) => T; +@@= skipped -9, +9 lines =@@ a13 = b13; // ok b13 = a13; // ok ~~~ diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithConstructSignatures3.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithConstructSignatures3.errors.txt.diff index c2b4ac4c1a..813eba3d97 100644 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithConstructSignatures3.errors.txt.diff +++ b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithConstructSignatures3.errors.txt.diff @@ -9,9 +9,8 @@ Types of parameters 'y' and 'y' are incompatible. Type 'T' is not assignable to type 'Derived2[]'. Type 'Base[]' is not assignable to type 'Derived2[]'. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz + Type 'Base' is missing the following properties from type 'Derived2': baz, bar -assignmentCompatWithConstructSignatures3.ts(83,1): error TS2322: Type 'new (x: Base[], y: Derived[]) => Derived[]' is not assignable to type 'new >(x: Base[], y: T) => T'. -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar +assignmentCompatWithConstructSignatures3.ts(83,1): error TS2322: Type 'new (x: Base[], y: Derived[]) => Derived[]' is not assignable to type 'new (x: Base[], y: T) => T'. Type 'Derived[]' is not assignable to type 'T'. 'Derived[]' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Derived[]'. @@ -25,9 +24,7 @@ !!! error TS2322: Types of parameters 'y' and 'y' are incompatible. !!! error TS2322: Type 'T' is not assignable to type 'Derived2[]'. !!! error TS2322: Type 'Base[]' is not assignable to type 'Derived2[]'. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - var b13: new >(x: Array, y: T) => T; +@@= skipped -9, +9 lines =@@ a13 = b13; // ok b13 = a13; // ok ~~~ diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer.errors.txt.diff deleted file mode 100644 index 58154d87b2..0000000000 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer.errors.txt.diff +++ /dev/null @@ -1,38 +0,0 @@ ---- old.assignmentCompatWithNumericIndexer.errors.txt -+++ new.assignmentCompatWithNumericIndexer.errors.txt -@@= skipped -2, +2 lines =@@ - Property 'bar' is missing in type 'Base' but required in type 'Derived'. - assignmentCompatWithNumericIndexer.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - 'number' index signatures are incompatible. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - assignmentCompatWithNumericIndexer.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. - 'number' index signatures are incompatible. - Type 'Derived' is not assignable to type 'T'. -@@= skipped -16, +16 lines =@@ - assignmentCompatWithNumericIndexer.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - 'number' index signatures are incompatible. - Type 'T' is not assignable to type 'Derived2'. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - - ==== assignmentCompatWithNumericIndexer.ts (6 errors) ==== -@@= skipped -30, +30 lines =@@ - ~~ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - !!! error TS2322: 'number' index signatures are incompatible. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - module Generics { - class A { -@@= skipped -40, +40 lines =@@ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - !!! error TS2322: 'number' index signatures are incompatible. - !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - var b3: { [x: number]: T; } - a = b3; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer2.errors.txt.diff deleted file mode 100644 index c450b6b5d2..0000000000 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithNumericIndexer2.errors.txt.diff +++ /dev/null @@ -1,38 +0,0 @@ ---- old.assignmentCompatWithNumericIndexer2.errors.txt -+++ new.assignmentCompatWithNumericIndexer2.errors.txt -@@= skipped -2, +2 lines =@@ - Property 'bar' is missing in type 'Base' but required in type 'Derived'. - assignmentCompatWithNumericIndexer2.ts(18,1): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - 'number' index signatures are incompatible. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - assignmentCompatWithNumericIndexer2.ts(32,9): error TS2322: Type '{ [x: number]: Derived; }' is not assignable to type 'A'. - 'number' index signatures are incompatible. - Type 'Derived' is not assignable to type 'T'. -@@= skipped -16, +16 lines =@@ - assignmentCompatWithNumericIndexer2.ts(37,9): error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - 'number' index signatures are incompatible. - Type 'T' is not assignable to type 'Derived2'. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - - ==== assignmentCompatWithNumericIndexer2.ts (6 errors) ==== -@@= skipped -30, +30 lines =@@ - ~~ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - !!! error TS2322: 'number' index signatures are incompatible. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - module Generics { - interface A { -@@= skipped -40, +40 lines =@@ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: number]: Derived2; }'. - !!! error TS2322: 'number' index signatures are incompatible. - !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - var b3: { [x: number]: T; } - a = b3; // ok \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer.errors.txt.diff deleted file mode 100644 index d5dd56892b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer.errors.txt.diff +++ /dev/null @@ -1,53 +0,0 @@ ---- old.assignmentCompatWithStringIndexer.errors.txt -+++ new.assignmentCompatWithStringIndexer.errors.txt -@@= skipped -2, +2 lines =@@ - Property 'bar' is missing in type 'Base' but required in type 'Derived'. - assignmentCompatWithStringIndexer.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - 'string' index signatures are incompatible. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - assignmentCompatWithStringIndexer.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. - 'string' index signatures are incompatible. - Property 'bar' is missing in type 'Base' but required in type 'Derived'. - assignmentCompatWithStringIndexer.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - 'string' index signatures are incompatible. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - assignmentCompatWithStringIndexer.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. - 'string' index signatures are incompatible. - Type 'Derived' is not assignable to type 'T'. -@@= skipped -22, +22 lines =@@ - assignmentCompatWithStringIndexer.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - 'string' index signatures are incompatible. - Type 'T' is not assignable to type 'Derived2'. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - - ==== assignmentCompatWithStringIndexer.ts (8 errors) ==== -@@= skipped -31, +31 lines =@@ - ~~ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - !!! error TS2322: 'string' index signatures are incompatible. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - module Generics { - class A { -@@= skipped -31, +31 lines =@@ - ~~ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - !!! error TS2322: 'string' index signatures are incompatible. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - function foo() { - var b3: { [x: string]: Derived; }; -@@= skipped -31, +31 lines =@@ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - !!! error TS2322: 'string' index signatures are incompatible. - !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer2.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer2.errors.txt.diff deleted file mode 100644 index 286b1397ae..0000000000 --- a/testdata/baselines/reference/submodule/conformance/assignmentCompatWithStringIndexer2.errors.txt.diff +++ /dev/null @@ -1,53 +0,0 @@ ---- old.assignmentCompatWithStringIndexer2.errors.txt -+++ new.assignmentCompatWithStringIndexer2.errors.txt -@@= skipped -2, +2 lines =@@ - Property 'bar' is missing in type 'Base' but required in type 'Derived'. - assignmentCompatWithStringIndexer2.ts(19,1): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - 'string' index signatures are incompatible. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - assignmentCompatWithStringIndexer2.ts(33,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived; }'. - 'string' index signatures are incompatible. - Property 'bar' is missing in type 'Base' but required in type 'Derived'. - assignmentCompatWithStringIndexer2.ts(41,5): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - 'string' index signatures are incompatible. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - assignmentCompatWithStringIndexer2.ts(46,9): error TS2322: Type '{ [x: string]: Derived; }' is not assignable to type 'A'. - 'string' index signatures are incompatible. - Type 'Derived' is not assignable to type 'T'. -@@= skipped -22, +22 lines =@@ - assignmentCompatWithStringIndexer2.ts(51,9): error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - 'string' index signatures are incompatible. - Type 'T' is not assignable to type 'Derived2'. -- Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+ Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - - ==== assignmentCompatWithStringIndexer2.ts (8 errors) ==== -@@= skipped -31, +31 lines =@@ - ~~ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - !!! error TS2322: 'string' index signatures are incompatible. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - module Generics { - interface A { -@@= skipped -31, +31 lines =@@ - ~~ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - !!! error TS2322: 'string' index signatures are incompatible. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - - function foo() { - var b3: { [x: string]: Derived; }; -@@= skipped -31, +31 lines =@@ - !!! error TS2322: Type 'A' is not assignable to type '{ [x: string]: Derived2; }'. - !!! error TS2322: 'string' index signatures are incompatible. - !!! error TS2322: Type 'T' is not assignable to type 'Derived2'. --!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': bar, baz -+!!! error TS2322: Type 'Base' is missing the following properties from type 'Derived2': baz, bar - } - } \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithPrivates.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithPrivates.errors.txt.diff deleted file mode 100644 index 1319fb2b29..0000000000 --- a/testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithPrivates.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.implementingAnInterfaceExtendingClassWithPrivates.errors.txt -+++ new.implementingAnInterfaceExtendingClassWithPrivates.errors.txt -@@= skipped -0, +0 lines =@@ - implementingAnInterfaceExtendingClassWithPrivates.ts(9,7): error TS2420: Class 'Bar' incorrectly implements interface 'I'. -- Type 'Bar' is missing the following properties from type 'I': x, y -+ Type 'Bar' is missing the following properties from type 'I': y, x - implementingAnInterfaceExtendingClassWithPrivates.ts(12,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. - Property 'x' is missing in type 'Bar2' but required in type 'I'. - implementingAnInterfaceExtendingClassWithPrivates.ts(16,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. -@@= skipped -19, +19 lines =@@ - class Bar implements I { // error - ~~~ - !!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. --!!! error TS2420: Type 'Bar' is missing the following properties from type 'I': x, y -+!!! error TS2420: Type 'Bar' is missing the following properties from type 'I': y, x - } - - class Bar2 implements I { // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt.diff deleted file mode 100644 index 19359b0ea1..0000000000 --- a/testdata/baselines/reference/submodule/conformance/implementingAnInterfaceExtendingClassWithProtecteds.errors.txt.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- old.implementingAnInterfaceExtendingClassWithProtecteds.errors.txt -+++ new.implementingAnInterfaceExtendingClassWithProtecteds.errors.txt -@@= skipped -0, +0 lines =@@ - implementingAnInterfaceExtendingClassWithProtecteds.ts(9,7): error TS2420: Class 'Bar' incorrectly implements interface 'I'. -- Type 'Bar' is missing the following properties from type 'I': x, y -+ Type 'Bar' is missing the following properties from type 'I': y, x - implementingAnInterfaceExtendingClassWithProtecteds.ts(12,7): error TS2420: Class 'Bar2' incorrectly implements interface 'I'. - Property 'x' is missing in type 'Bar2' but required in type 'I'. - implementingAnInterfaceExtendingClassWithProtecteds.ts(16,7): error TS2420: Class 'Bar3' incorrectly implements interface 'I'. -@@= skipped -23, +23 lines =@@ - class Bar implements I { // error - ~~~ - !!! error TS2420: Class 'Bar' incorrectly implements interface 'I'. --!!! error TS2420: Type 'Bar' is missing the following properties from type 'I': x, y -+!!! error TS2420: Type 'Bar' is missing the following properties from type 'I': y, x - } - - class Bar2 implements I { // error \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/invalidReturnStatements.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/invalidReturnStatements.errors.txt.diff deleted file mode 100644 index 98ba66663f..0000000000 --- a/testdata/baselines/reference/submodule/conformance/invalidReturnStatements.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.invalidReturnStatements.errors.txt -+++ new.invalidReturnStatements.errors.txt -@@= skipped -1, +1 lines =@@ - invalidReturnStatements.ts(3,17): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - invalidReturnStatements.ts(4,17): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - invalidReturnStatements.ts(5,17): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. --invalidReturnStatements.ts(16,22): error TS2739: Type '{ id: number; }' is missing the following properties from type 'D': dispose, name -+invalidReturnStatements.ts(16,22): error TS2739: Type '{ id: number; }' is missing the following properties from type 'D': name, dispose - invalidReturnStatements.ts(18,22): error TS2741: Property 'name' is missing in type 'C' but required in type 'D'. - - -@@= skipped -30, +30 lines =@@ - } - function fn10(): D { return { id: 12 }; } - ~~~~~~ --!!! error TS2739: Type '{ id: number; }' is missing the following properties from type 'D': dispose, name -+!!! error TS2739: Type '{ id: number; }' is missing the following properties from type 'D': name, dispose - - function fn11(): D { return new C(); } - ~~~~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submodule/conformance/typeAssertions.errors.txt.diff b/testdata/baselines/reference/submodule/conformance/typeAssertions.errors.txt.diff deleted file mode 100644 index 1a7ccf094b..0000000000 --- a/testdata/baselines/reference/submodule/conformance/typeAssertions.errors.txt.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- old.typeAssertions.errors.txt -+++ new.typeAssertions.errors.txt -@@= skipped -1, +1 lines =@@ - typeAssertions.ts(31,12): error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. - typeAssertions.ts(35,15): error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -- Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x -+ Type 'SomeOther' is missing the following properties from type 'SomeDerived': x, p - typeAssertions.ts(37,13): error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. - typeAssertions.ts(38,13): error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -@@= skipped -65, +65 lines =@@ - someDerived = someOther; // Error - ~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. --!!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x -+!!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': x, p - - someOther = someDerived; // Error - ~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff index 75ffbcabed..a8e9b0d3d7 100644 --- a/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff +++ b/testdata/baselines/reference/submoduleAccepted/conformance/jsdocTypeTagCast.errors.txt.diff @@ -1,12 +1,6 @@ --- old.jsdocTypeTagCast.errors.txt +++ new.jsdocTypeTagCast.errors.txt -@@= skipped -1, +1 lines =@@ - b.js(45,23): error TS2352: Conversion of type 'SomeOther' to type 'SomeBase' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Property 'p' is missing in type 'SomeOther' but required in type 'SomeBase'. - b.js(49,26): error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -- Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x -+ Type 'SomeOther' is missing the following properties from type 'SomeDerived': x, p - b.js(51,24): error TS2352: Conversion of type 'SomeDerived' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +@@= skipped -6, +6 lines =@@ Property 'q' is missing in type 'SomeDerived' but required in type 'SomeOther'. b.js(52,24): error TS2352: Conversion of type 'SomeBase' to type 'SomeOther' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Property 'q' is missing in type 'SomeBase' but required in type 'SomeOther'. @@ -17,7 +11,7 @@ b.js(66,15): error TS1228: A type predicate is only allowed in return type position for functions and methods. b.js(66,38): error TS2454: Variable 'numOrStr' is used before being assigned. b.js(67,2): error TS2322: Type 'string | number' is not assignable to type 'string'. -@@= skipped -19, +15 lines =@@ +@@= skipped -14, +10 lines =@@ ==== a.ts (0 errors) ==== var W: string; @@ -26,16 +20,7 @@ // @ts-check var W = /** @type {string} */(/** @type {*} */ (4)); -@@= skipped -58, +58 lines =@@ - someDerived = /** @type {SomeDerived} */(someOther); // Error - ~~~~~~~~~~~ - !!! error TS2352: Conversion of type 'SomeOther' to type 'SomeDerived' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. --!!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': p, x -+!!! error TS2352: Type 'SomeOther' is missing the following properties from type 'SomeDerived': x, p - - someOther = /** @type {SomeOther} */(someDerived); // Error - ~~~~~~~~~ -@@= skipped -18, +18 lines =@@ +@@= skipped -76, +76 lines =@@ someFakeClass = someDerived; someBase = someFakeClass; // Error