2 lines
95 B
TypeScript
2 lines
95 B
TypeScript
|
export const isKeyInObject = <T extends object>(k: PropertyKey, o: T): k is keyof T => k in o;
|