Type Signature · #33 · 2026-05-07
Can you assign `price` to a variable of type `EUR`?
TypeScript ·Difficulty 3/3
How to play
Read the TypeScript snippet and pick the correct type from four choices. Think about inference, narrowing, and utility types. Press 1–4 or click to answer.
type USD = number & { __brand: 'usd' };
type EUR = number & { __brand: 'eur' };
const price: USD = 10 as USD;
Loading your progress...
Press 1 through 4, or tap a numbered choice, to answer. Back to hub