guardObjectKeyIn()
guardObjectKeyIn()
const guardObjectKeyIn = <
Obj extends object,
Key extends keyof Obj,
Payload extends object = object
>(
value: Obj,
key: Key,
callback?: ResultCallback<Obj, { key: typeof key } & Payload>,
payload?: Payload
): value is Obj => isObjectKeyIn(value, key, callback, payload as any);Generic type variables
Objextendsobject
Keyextends keyofObj
Payloadextendsobject=object
Parameters
value: Obj
key: Key
callback?: ResultCallback<Obj, { key: typeof key } & Payload>
payload?: Payload
Return type
Returns
Example usage
Last updated