Web Development TypeScript Mcq
Oct 04, 2025

How do you create a mapped type in TypeScript?

Choose the correct answer:
A) type Readonly<T> = { readonly [P in keyof T]: T[P] }
B) type Readonly<T> = { [P: keyof T]: T[P] }
C) type Readonly<T> = { [P of T]: T[P] }
D) type Readonly<T> = { readonly P in T: T[P] }
Discussion (0)

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

Share Your Thoughts
Feedback