C.W.K.
Stream
Quiz · 3 questions

🛡️ Strict Mode — The Flags That Make TS Honest

strict, noImplicitAny, strictNullChecks, noUncheckedIndexedAccess, exactOptionalPropertyTypes

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

Quiz

01What does noImplicitAny catch?
Hint
Try writing a function with one unannotated parameter and turn the flag on/off. The diff is one error message.
02What does noUncheckedIndexedAccess add?
Hint
Try arr[100] on a length-3 array with and without the flag. The type difference is the whole story.
03What does exactOptionalPropertyTypes change about optional fields?
Hint
The flag's name is exact: 'optional means missing, not explicitly undefined.' If your runtime code distinguishes the two, the types now do too.
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.