TypeScript | Advanced Types in TypeScript | Question4

Last Updated :
Discuss
Comments

What does the following mapped type do?

TypeScript
type ReadonlyProperties<T> = {
    readonly [K in keyof T]: T[K];
};


Converts all keys of T to strings.

Makes all properties of T optional.

Makes all properties of T readonly.

Maps all values of T to undefined.

Share your thoughts in the comments