export declare function exclude(...excluded: R[]): (t: T) => t is Exclude; /** * returns an object composed of the picked object properties * @example * ```ts * pick({ a: 1, b: 2 }, ['a']) // => { a: 1 } * ``` */ export declare function pick(record: O, keys: Iterable): Pick; /** * Maps key value pairs of a plain object */ export declare function mapObject(obj: object, mapping: (entry: [string, any]) => [string, any]): { [k: string]: any; }; /** * Maps values of a plain object */ export declare function mapValues(obj: T, mapping: (value: T[keyof T], k?: keyof T) => R): { [_ in keyof T]: R; }; /** * Maps values of a plain object */ export declare function mapKeys(obj: object, mapping: (key: keyof T, value?: T[keyof T]) => R): Record; /** * Checks if value is an object, e.g. a plain object, an array, a function, * a regex, but not a primitive value. * * Common usage scenario: * ```ts * isObject(value) && value.foo === 'bar'; * // Instead of: * typeof value === 'object' && value !== null && 'foo' in value && value.foo === 'bar'; * ``` */ export declare function isObject(value: unknown): value is Readonly>; /** * Checks that value is a POJO */ export declare function isPlainObject(value: unknown): value is Record; /** * Logs an error * @deprecated This function is an anti-pattern, and was used by everyone to bypass the no-console lint rule; avoid using it! *Handle failures* rather than only printing them to the console. */ export declare function reportError(ex: unknown): void; /** * Awaits a record of promises, and returns a record of their results. */ export declare function awaitRecord>, Out extends { [K in keyof In]: In[K] extends Promise ? U : never; }, Key extends string>(obj: In): Promise; export declare const newMacrotask: () => Promise; /** * Reverses keys-values of an object, ignoring falsy values. * First takes on value collisions. * @returns a new object with the values as keys and the keys as values * @example * ```ts * reverseObject({ a: 'y', b: 'z'}) // => { y: 'a', z: 'b' } * ``` */ export declare function reverseObject(obj: Record): Record; /** * Returns an object where missing keys and values/keys * that satisfy shouldUseDefault * to the value in shouldUseDefault. * * @example * ```ts * defaults({}, {a:0}) // => {a:0} * defaults({a:1}, {a:0}) // => {a:1} * defaults({a:{}}, {a:{b:1}}) // => {a:{b:1}} * ``` * by default, any undefined value will be replaced * @param deep - [true] perform a deep comparison * @example * ```ts * defaults({a:{}}, {a:{b:1}}, false) // => {a:{}} * ``` * @param shouldUseDefault - value/key for which shouldUseDefault * returns true will be taken from defaultValues, * ignoring source. * k is provided as a dot separated path * @example * ```ts * defaults({a:{b:1}}, {a:{b:2}}, true, (_,k)=>k==='a.b') // => {a:{b:2}} * defaults({a:1}, {a:2}, true, v=>v===1) // => {a:2} * ``` * @returns a new object with merged source and defaultValues */ export declare function defaults(_source: S, _defaultValues: D, deep?: boolean, shouldUseDefault?: (v: unknown, _key: string) => boolean): S & D; /** * @param obj - The object to query * @param path - The path of the property to get. * @returns The value at `path` of `object` id exists, `undefined` otherwise * @example * ```ts * getIn({ a: { b: 'c' } }, ['a', 'b']) // => c * ``` */ export declare function getIn(obj: Record, path: string[]): unknown; //# sourceMappingURL=objects.d.ts.map