Web Development TypeScript Mcq
Oct 04, 2025

How do you create a type that excludes never from a union?

Choose the correct answer:
A) type NonNever<T> = T extends never ? never : T
B) type NonNever<T> = Exclude<T, never>
C) type NonNever<T> = T
D) Both A and C work due to distributive conditional types
Discussion (0)

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

Share Your Thoughts
Feedback