DEV Community

Typescript WTF Moments Series' Articles

Back to Acid Coder's Series
Typescript WTF Moments 1: Mixing String Literal Key And String Key In Object Literal Type

Typescript WTF Moments 1: Mixing String Literal Key And String Key In Object Literal Type

4
Comments
1 min read
Typescript WTF Moments 2: keyof {[x:string]:string} is string | number

Typescript WTF Moments 2: keyof {[x:string]:string} is string | number

3
Comments
1 min read
Typescript WTF Moments 3: Type of Key is `string` if Key is Template Literal `a/${string}`

Typescript WTF Moments 3: Type of Key is `string` if Key is Template Literal `a/${string}`

3
Comments
1 min read
Typescript WTF Moments 4: never extends `${infer P}` yield different result than never extends `${infer P}/`

Typescript WTF Moments 4: never extends `${infer P}` yield different result than never extends `${infer P}/`

3
Comments
1 min read
Typescript WTF Moments 5: const a = 'a' is not equal to const a = 'a' as const and const a:'a'='a'

Typescript WTF Moments 5: const a = 'a' is not equal to const a = 'a' as const and const a:'a'='a'

3
Comments
1 min read
Typescript WTF Moments 6: Non Collapsing Object Unions

Typescript WTF Moments 6: Non Collapsing Object Unions

2
Comments
1 min read
Typescript WTF Moments 7: Boolean can extends Record<infer X,unknown>

Typescript WTF Moments 7: Boolean can extends Record<infer X,unknown>

1
Comments 3
1 min read
Typescript WTF Moments 8: Type Level Equality Not Working With Intersection

Typescript WTF Moments 8: Type Level Equality Not Working With Intersection

Comments
1 min read
Typescript WTF Moments 9: Evolving Empty Array Type

Typescript WTF Moments 9: Evolving Empty Array Type

4
Comments
1 min read
Typescript WTF Moments 10: The Special Case: T[] extends B[]

Typescript WTF Moments 10: The Special Case: T[] extends B[]

2
Comments
2 min read
Typescript WTF Moments 11: Function Unions: any Param Is Not any

Typescript WTF Moments 11: Function Unions: any Param Is Not any

Comments
1 min read
Typescript WTF Moment 12: Beware of Object Literal Unions

Typescript WTF Moment 12: Beware of Object Literal Unions

6
Comments
2 min read