Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is:

--- old.arrayCast.errors.txt
+++ new.arrayCast.errors.txt
@@= skipped -0, +0 lines =@@
-arrayCast.ts(3,23): error TS2352: Conversion of type '{ foo: string; }[]' to type '{ id: number; }[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
-  Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'.
+arrayCast.ts(3,23): error TS2353: Object literal may only specify known properties, and 'foo' does not exist in type '{ id: number; }'.

It does seems like that top error provides more guidance, and with the new stack, we probably never generate it anymore?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix this by adding the error message to the list of ones we don't suppress

File renamed without changes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--- old.assignmentCompatability45.errors.txt
+++ new.assignmentCompatability45.errors.txt
@@= skipped -0, +0 lines =@@
 assignmentCompatability45.ts(7,7): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'.
-  Types of construct signatures are incompatible.
-    Type 'new (x: number) => B' is not assignable to type 'abstract new () => A'.
-      Target signature provides too few arguments. Expected 1 or more, but got 0.
+  Target signature provides too few arguments. Expected 1 or more, but got 0.

It is unfortunate that we elide the whole stack, so at no point do we actually say what signature typeof B has...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix this by adding the error message ("Type of construct signatures are incompatible") to the list of ones we don't suppress

File renamed without changes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--- old.constraints0.errors.txt
+++ new.constraints0.errors.txt
@@= skipped -0, +0 lines =@@
-constraints0.ts(14,19): error TS2344: Type 'B' does not satisfy the constraint 'A'.
-  Property 'a' is missing in type 'B' but required in type 'A'.
+constraints0.ts(14,19): error TS2741: Property 'a' is missing in type 'B' but required in type 'A'.

This is one of those things I think there was disagreement about. I think it's a bummer to lose the word "constraint" here, but...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's raise this in a meeting and accept for now

File renamed without changes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

     declare var e: Elephant;
     f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal
          ~
-!!! error TS2345: Argument of type 'Elephant' is not assignable to parameter of type 'Giraffe'.
-!!! error TS2345:   Property 'y' is missing in type 'Elephant' but required in type 'Giraffe'.
+!!! error TS2741: Property 'y' is missing in type 'Elephant' but required in type 'Giraffe'.
 !!! related TS2728 typeArgumentInferenceWithConstraintAsCommonRoot.ts:2:36: 'y' is declared here.

Not mega thrilled we don't clearly identify which type is the arg and which is the parameter...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's raise this in a meeting and accept for now

File renamed without changes.
Comment thread
jakebailey marked this conversation as resolved.
File renamed without changes.
58 changes: 57 additions & 1 deletion testdata/submoduleAccepted.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,63 @@ fourslash/inlayHints/inlayHintsInteractiveVariableTypes2.baseline.diff
fourslash/inlayHints/inlayHintsVariableTypes3.baseline.diff
fourslash/inlayHints/inlayHintsInteractiveFunctionParameterTypes1.baseline.diff

## regex checking ##
## Skipped error elaboration ##
compiler/arrayCast.errors.txt.diff
compiler/assignmentCompatWithOverloads.errors.txt.diff
compiler/assignmentCompatability44.errors.txt.diff
compiler/assignmentCompatability45.errors.txt.diff
compiler/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt.diff
compiler/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt.diff
compiler/bigintWithLib.errors.txt.diff
compiler/classSideInheritance3.errors.txt.diff
compiler/computedPropertyBindingElementDeclarationNoCrash1.errors.txt.diff
compiler/constraints0.errors.txt.diff
compiler/differentTypesWithSameName.errors.txt.diff
compiler/excessPropertyCheckWithUnions.errors.txt.diff
compiler/genericConstraint2.errors.txt.diff
compiler/genericTypeConstraints.errors.txt.diff
compiler/generics1.errors.txt.diff
compiler/generics2.errors.txt.diff
compiler/generics5.errors.txt.diff
compiler/inferenceFromIncompleteSource.errors.txt.diff
compiler/mappedTypeAsStringTemplate.errors.txt.diff
compiler/noParameterReassignmentJSIIFE.errors.txt.diff
compiler/objectLiteralFunctionArgContextualTyping2.errors.txt.diff
compiler/objectLiteralThisWidenedOnUse.errors.txt.diff
compiler/recursiveClassReferenceTest.errors.txt.diff
compiler/templateStringsArrayTypeDefinedInES5Mode(target=es2015).errors.txt.diff
compiler/templateStringsArrayTypeNotDefinedES5Mode(target=es2015).errors.txt.diff
compiler/templateStringsArrayTypeRedefinedInES6Mode.errors.txt.diff
compiler/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt.diff
conformance/decoratorOnClassMethod10(target=es2015).errors.txt.diff
conformance/destructuringParameterDeclaration2.errors.txt.diff
conformance/destructuringParameterDeclaration5.errors.txt.diff
conformance/es2020IntlAPIs.errors.txt.diff
conformance/genericCallWithObjectTypeArgsAndConstraints4.errors.txt.diff
conformance/genericCallWithObjectTypeArgsAndConstraints5.errors.txt.diff
conformance/instanceofOperatorWithInvalidOperands.es2015.errors.txt.diff
conformance/iterableArrayPattern17.errors.txt.diff
Comment on lines +94 to +96
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These accepted baseline entries don't have corresponding files under testdata/baselines/reference/submoduleAccepted/conformance/. Currently instanceofOperatorWithInvalidOperands.es2015.errors.txt.diff is listed here but the diff file is missing, so the submoduleAccepted baseline set will reference a non-existent baseline. Add the missing .errors.txt.diff file(s) or remove/correct this entry.

This issue also appears on line 116 of the same file.

Copilot uses AI. Check for mistakes.
conformance/iterableArrayPattern18.errors.txt.diff
conformance/iterableArrayPattern19.errors.txt.diff
conformance/mappedTypeConstraints2.errors.txt.diff
conformance/narrowingGenericTypeFromInstanceof01.errors.txt.diff
conformance/noInfer.errors.txt.diff
conformance/objectLiteralShorthandPropertiesFunctionArgument2.errors.txt.diff
conformance/subtypingWithNumericIndexer2.errors.txt.diff
conformance/subtypingWithNumericIndexer3.errors.txt.diff
conformance/subtypingWithNumericIndexer4.errors.txt.diff
conformance/subtypingWithNumericIndexer5.errors.txt.diff
conformance/subtypingWithStringIndexer2.errors.txt.diff
conformance/subtypingWithStringIndexer3.errors.txt.diff
conformance/subtypingWithStringIndexer4.errors.txt.diff
conformance/thisTypeInFunctionsNegative.errors.txt.diff
conformance/typeSatisfaction.errors.txt.diff
conformance/typeSatisfactionWithDefaultExport.errors.txt.diff
conformance/typeSatisfaction_errorLocations1.errors.txt.diff
conformance/typedefMultipleTypeParameters.errors.txt.diff
conformance/unionTypeCallSignatures6.errors.txt.diff
conformance/usingDeclarations.14.errors.txt.diff
conformance/usingDeclarationsWithIteratorObject.errors.txt.diff

## find all references ##
fourslash/findAllReferences/isDefinitionAcrossGlobalProjects.baseline.jsonc.diff
Expand Down
Loading