UNPKG

is-type-of

Version:
5 lines (4 loc) 411 B
export type Class = new (...args: any[]) => any; export declare function isInstanceOf<T extends Class>(val: unknown, Clazz: T): val is InstanceType<T>; export declare function hasOwnProperty<T extends object>(obj: T, prop: PropertyKey): obj is T & Record<typeof prop, unknown>; export declare function hasOwnPropertyInChain<T extends object>(obj: T, prop: PropertyKey): obj is T & Record<typeof prop, unknown>;