Projects T to an object containing only its readonly non-callable properties.
T
Readonly modifiers, optional modifiers, and property value types are preserved.
Object type to project.
interface Example{ readonly id: string; readonly created?: Date; readonly callback: () => void; value: number;}type Result = ReadonlyDataProperties<Example>;// {// readonly id: string;// readonly created?: Date;// } Copy
interface Example{ readonly id: string; readonly created?: Date; readonly callback: () => void; value: number;}type Result = ReadonlyDataProperties<Example>;// {// readonly id: string;// readonly created?: Date;// }
Projects
Tto an object containing only its readonly non-callable properties.Readonly modifiers, optional modifiers, and property value types are preserved.