Extract all writable keys from the given type.
This is useful when you want to create a new type that contains writable keys only.
import type {WritableKeysOf} from 'type-fest';interface User { name: string; surname: string; readonly id: number;}type UpdateRequest<Entity extends object> = Pick<Entity, WritableKeysOf<Entity>>;const update1: UpdateRequest<User> = { name: 'Alice', surname: 'Acme',}; Copy
import type {WritableKeysOf} from 'type-fest';interface User { name: string; surname: string; readonly id: number;}type UpdateRequest<Entity extends object> = Pick<Entity, WritableKeysOf<Entity>>;const update1: UpdateRequest<User> = { name: 'Alice', surname: 'Acme',};
Extract all writable keys from the given type.
This is useful when you want to create a new type that contains writable keys only.