C.W.K.
Stream
Quiz · 3 questions

🔷 Types & Interfaces — Naming the Shapes

type aliases, interfaces, structural typing, the closer-than-you-think comparison

Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete

Quiz

01What's the practical difference between type and interface?
Hint
Try writing type Color = 'red' | 'blue' as an interface. You can't — that's one of the differences.
02What does 'structural typing' mean in TypeScript?
Hint
If you've used Python's Protocols or Go's interfaces, that's structural typing in a different language. TypeScript took the same idea further.
03Why does readonly only enforce at compile time, not at runtime?
Hint
Recall the two-layer mental model from the Foundations track. readonly lives entirely in the type layer.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.