Skip to main content

ReadonlyKeys

@webda/utils


Type Alias: ReadonlyKeys<T>

ReadonlyKeys<T> = { [P in keyof T]-?: IfEquals<{ [Q in P]: T[P] }, { -readonly [Q in P]: T[P] }, never, P> }[keyof T]

Defined in: packages/utils/src/types.ts:196

Extract the keys of T that are marked readonly.

For each property, a single-prop type is compared against its mutable counterpart via IfEquals; keys that differ were originally readonly.

Type Parameters​

T​

T