Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
TypeScript
0/50 solved · 0%
All lessons
lesson
code
Utility Types · medium
33. Extract Utility
Keep only shared types in a union.
Extract 'a' from 'a' | 'b' | 'c'.
Required in your answer:
Extract<T, 'a'>
Reveal solution
Run & check
Reset
Transpiled, then run in a sandbox
type T = 'a' | 'b' | 'c'; type A = any; // TODO
Output appears here.
← 32. Exclude Utility
34. User-Defined Type Guards →