-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce flattened error reporting for properties, call signatures, and construct signatures #33473
Introduce flattened error reporting for properties, call signatures, and construct signatures #33473
Conversation
…and construct signatures
@typescript-bot test this |
Heya @weswigham, I've started to run the extended test suite on this PR at 06908f8. You can monitor the build here. It should now contribute to this PR's status checks. |
Heya @weswigham, I've started to run the tarball bundle task on this PR at 06908f8. You can monitor the build here. It should now contribute to this PR's status checks. |
cc @DanielRosenwasser @RyanCavanaugh because the assign reviewers thing is stuck |
Love it! I'm okay with rephrasing to
Additionally, if there is a way to track that there are no parameters, I would cut out the |
Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running |
@typescript-bot test this |
Heya @weswigham, I've started to run the extended test suite on this PR at d4fcff2. You can monitor the build here. It should now contribute to this PR's status checks. |
Heya @weswigham, I've started to run the tarball bundle task on this PR at d4fcff2. You can monitor the build here. It should now contribute to this PR's status checks. |
Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running |
@DanielRosenwasser feel free to look over the RWC changes, they seem pretty OK to me~ |
@typescript-bot test this @DanielRosenwasser your in-person request of skipping leading signatures is now in~ |
Heya @weswigham, I've started to run the tarball bundle task on this PR at f5dc527. You can monitor the build here. It should now contribute to this PR's status checks. |
Heya @weswigham, I've started to run the extended test suite on this PR at f5dc527. You can monitor the build here. It should now contribute to this PR's status checks. |
Hey @weswigham, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running |
@DanielRosenwasser @sandersn whenever you get a chance, give this a review, so we can start testing it in the nightly to see what people think about it. It's fairly simple to introduce a toggle back to the old style of elaboration, if need be. |
This PR has a playground so you can try it out on the site. |
Types of property 'b' are incompatible. | ||
Type 'number' is not assignable to type 'string'. | ||
The types of 'x.b' are incompatible between these types. | ||
Type 'number' is not assignable to type 'string'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does The types of 'x.b' are incompatible between these types.
feels grammatically odd to you?
Maybe The types of 'x.b' are incompatible
.
Though I guess it could be because it's going to mention it on the next line: in which case:
The types of 'x.b' are incompatible between these types:
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The period vs colon argument could be had for every line of our pyramid of elaborations - we've settled on period right now 🤷♂
!!! related TS2728 tests/cases/compiler/invariantGenericErrorElaboration.ts:12:3: 'tag' is declared here. | ||
!!! error TS2322: The types of 'constraint.constraint.constraint' are incompatible between these types. | ||
!!! error TS2322: Type 'Constraint<Constraint<Constraint<Num>>>' is not assignable to type 'Constraint<Constraint<Constraint<Runtype<any>>>>'. | ||
!!! error TS2322: Type 'Constraint<Runtype<any>>' is not assignable to type 'Constraint<Num>'. | ||
const Foo = Obj({ foo: Num }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so good
@DanielRosenwasser I've added the specialization for construct/call-ending chains - would you care to add more feedback/:+1:? |
!!! error TS2322: Object literal may only specify known properties, and 'jj' does not exist in type 'Style'. | ||
!!! error TS2322: The types returned by 'pop()' are incompatible between these types. | ||
!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'Style'. | ||
!!! error TS2322: Type '{ foo: string; jj: number; }[][]' is not assignable to type 'StyleArray'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wtf
@typescript-bot pack this |
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at 4fdabf1. You can monitor the build here. It should now contribute to this PR's status checks. |
Hey @DanielRosenwasser, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running |
Hey @DanielRosenwasser, something went wrong when looking for the build artifact. (You can check the log here). |
@@ -12320,7 +12320,7 @@ namespace ts { | |||
target: Signature, | |||
ignoreReturnTypes: boolean): boolean { | |||
return compareSignaturesRelated(source, target, CallbackCheck.None, ignoreReturnTypes, /*reportErrors*/ false, | |||
/*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; | |||
/*errorReporter*/ undefined, /*errorReporter*/ undefined, compareTypesAssignable) !== Ternary.False; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be /*incompatibleErrorReporter*/
, right?
Fixes #33361
Before:
After: