export declare const isObject: (object: unknown) => object is object; export declare const isKeyInObject: (object: unknown, key: Key) => object is object & Record; /** * A utility type that removes all keys with `undefined` values from an object. * * Note: Optional keys with `undefined` values are not removed. * * @example * ```ts * type Foo = { a: string; b: number | undefined; c?: boolean }; * type Bar = RemoveUndefinedKeys; * // Bar is { a: string; b: number; c?: boolean } * ``` */ type RemoveUndefinedKeys = { [Key in keyof T as T[Key] extends undefined ? never : Key]: Exclude; }; /** * Remove all keys with `undefined` values from an object. This function only * performs a shallow removal, i.e. it does not remove `undefined` values nested * in objects. * * @param object The object to remove `undefined` keys from. * @returns A new object with all `undefined` keys removed. */ export declare const removeUndefinedKeys: (object: T) => RemoveUndefinedKeys; export {};