Web Development TypeScript Mcq
Oct 04, 2025

What is the purpose of the "asserts" keyword in type predicates?

Choose the correct answer:
A) Throws an error if condition is false
B) Narrows type and throws if assertion fails
C) Only for debugging
D) Creates runtime assertions
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback