Skip to content

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

@DanielRosenwasser

Description

@DanielRosenwasser

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?

Metadata

Metadata

Labels

CommittedThe team has roadmapped this issueDomain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions