Skip to content
Typetypesv0.16.2

TypedOmit

Type-safe version of Omit that ensures the keys exist on the target object

type TypedOmit<TargetObj, ObjKeys extends keyof TargetObj> = Omit<
    TargetObj,
    ObjKeys
>;

TargetObj

The object type to omit properties from

TargetObj

ObjKeys

The keys to omit from the object

ObjKeys extends keyof TargetObj