@ngneat/falso
Version:
All the Fake Data for All Your Real Needs
8 lines (7 loc) • 414 B
TypeScript
export type ObjectKeys<T extends Record<PropertyKey, unknown>> = Exclude<keyof T, symbol>;
/**
* A utility function which behaves identical to
* [Object.keys()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys).
* It preserves type strictly
*/
export declare const objectKeys: <Type extends Record<PropertyKey, unknown>>(obj: Type) => Exclude<keyof Type, symbol>[];