Skip to content
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

Skip ahead on error elaboration for source -> target | null | undefined when source is atomic #25086

Closed
DanielRosenwasser opened this issue Jun 20, 2018 · 0 comments
Assignees
Labels
Committed The team has roadmapped this issue Domain: Error Messages The issue relates to error messaging Fixed A PR has been merged for this issue Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

https://twitter.com/mattferderer/status/1009249732512841728

It's great that the user is happy we caught a bug, but we sure didn't need that elaboration when checking against CSSProperties | undefined. TypeScript ends up repeating itself on the next level checking directly against CSSProperties.

image

Does it make sense to always just get the non-nullable version of the target type if the source type is a non-union type?

@DanielRosenwasser DanielRosenwasser added the Domain: Error Messages The issue relates to error messaging label Jun 20, 2018
@mhegazy mhegazy added the Suggestion An idea for TypeScript label Jun 20, 2018
@DanielRosenwasser DanielRosenwasser added the Committed The team has roadmapped this issue label Jun 21, 2018
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 3.0 milestone Jun 21, 2018
@DanielRosenwasser DanielRosenwasser self-assigned this Jun 21, 2018
@DanielRosenwasser DanielRosenwasser added the Fixed A PR has been merged for this issue label Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Committed The team has roadmapped this issue Domain: Error Messages The issue relates to error messaging Fixed A PR has been merged for this issue Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants