We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
conditional types different name
v4.4.0-beta
Playground link with relevant code
type Left<Z> = <T>() => (T extends Z ? 1 : 2); type Right<Z> = <T>() => (T extends Z ? 1 : 2); type Equal1<X, Y> = Left<X> extends Right<Y> ? true : false; type Equal2<X, Y> = Left<X> extends Left<Y> ? true : false; // false type X1 = Equal1<{a:string}, {readonly a: string}> // true type X2 = Equal2<{a:string}, {readonly a: string}>
X1 and X2 is different.
X1
X2
X1 and X2 is the same.
Actually, Left and Right are the same, Equal1 and Equal2 are the same. But the result of Equal1 and Equal2 with the same parameters are different.
Left
Right
Equal1
Equal2
Bug Report
π Search Terms
conditional types different name
π Version & Regression Information
v4.4.0-beta
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
X1andX2is different.π Expected behavior
X1andX2is the same.Actually,
LeftandRightare the same,Equal1andEqual2are the same.But the result of
Equal1andEqual2with the same parameters are different.