import { type IsNever } from 'type-fest'; /** * Gets all keys of an object. This is similar to * [`Object.keys`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys) * except that it also grabs symbol keys and has better TypeScript typing. * * @category Object * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function getObjectTypedKeys(input: ObjectGeneric): Array; /** * Performs `keyof` on all keys within the `Original` that have values matching the given `Matcher`. * * @category Object * @category Package : @augment-vir/common * @example * * ```ts * import {ExtractKeysWithMatchingValues} from '@augment-vir/common'; * * type ExtractedKeys = ExtractKeysWithMatchingValues<{a: RegExp; b: string}, string>; * // `ExtractedKeys` is `'b'` * ``` * * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type ExtractKeysWithMatchingValues = keyof { [Key in keyof Original as IsNever> extends true ? never : Key]: Key; }; /** * Performs `keyof` on all keys within the `OriginalObject` that have values _not_ matching the * given `Matcher`. * * @category Object * @category Package : @augment-vir/common * @example * * ```ts * import {ExcludeKeysWithMatchingValues} from '@augment-vir/common'; * * type ExcludedKeys = ExcludeKeysWithMatchingValues<{a: RegExp; b: string}, string>; * // `ExcludedKeys` is `'a'` * ``` * * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export type ExcludeKeysWithMatchingValues = keyof { [Key in keyof Original as IsNever> extends true ? Key : never]: never; };