react-querybuilder
Version:
React Query Builder component for constructing queries and filters, with utilities for executing them in various database and evaluation contexts
21 lines (20 loc) • 852 B
TypeScript
/**
* Original looked like this (not sure why template string is used):
* ```
* type ObjectKeys<T extends object> = `${Exclude<keyof T, symbol>}`;
* ```
*/
type ObjectKeys<T extends object> = Exclude<keyof T, symbol>;
/**
* A strongly-typed version of `Object.keys()`.
*
* [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-keys.ts)
*/
export declare const objectKeys: <Type extends object>(value: Type) => Array<ObjectKeys<Type>>;
/**
* A strongly-typed version of `Object.entries()`.
*
* [Original source](https://github.com/sindresorhus/ts-extras/blob/44f57392c5f027268330771996c4fdf9260b22d6/source/object-entries.ts)
*/
export declare const objectEntries: <Type extends Record<PropertyKey, unknown>>(value: Type) => Array<[ObjectKeys<Type>, Type[ObjectKeys<Type>]]>;
export {};