-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Description
π Search Terms
non-distributive, conditional type, errorType
π Version & Regression Information
- This issue has been reproducible since v5.1.6. In earlier versions, it likely behaves differently due to the impact of Propagate
errorTypeingetConditionalTypeΒ #53801.
β― Playground Link
π» Code
type ErrorType = typeof unknownValue;
type A = ErrorType extends unknown ? true : false;
type B = [ErrorType] extends [unknown] ? true : false;π Actual behavior
A is any type, and B is true type.
π Expected behavior
Both A and B should be any type.
Additional information about the issue
As far as I know, errorType propagates as errorType regardless of the type operation. However, only in the case of non-distributive conditional types, errorType does not propagate. Is this the intended behavior?
Metadata
Metadata
Assignees
Labels
No labels