Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
TypeScript
/
Advanced types
Which conditional tests whether a union T as a whole is assignable to U?
from Advanced types
TypeScript 6
advanced
1 min
Which conditional tests whether a union T as a whole is assignable to U?
T extends U ? true : false
[T] extends [U] ? true : false
keyof T extends U ? true : false
T[keyof T] extends U ? true : false
Check
Ask AI about this kata
Report an error
next kata
Why does { [K in keyof M]: { type: K; payload: M[K] } }[keyof M] preserve an event name-p…
Quiz
A new version is available
Reload