Skip to content

Type Alias: PartialKeys<T>

ts
type PartialKeys<T> = { [P in keyof T]?: unknown };

Creates a type where all keys are optional and values are unknown. Useful for partial key matching in conditional types.

Type Parameters

Type ParameterDescription
TThe object type to make partially keyed