@piplup/utils
Version:
A collection of utility hooks and functions crafted to power up the packages within Piplup.
8 lines (7 loc) • 341 B
TypeScript
/**
* Checks if the given object has a property with the specified key.
* @param obj - The object to check.
* @param prop - The property key to check.
* @returns true if the object has the property, otherwise false.
*/
export declare function hasOwnProperty<X, Y extends PropertyKey>(obj: X, prop: Y): obj is X & Record<Y, X[keyof X]>;