import { NonUndefined } from 'utility-types'; import { Existent, Key, Nil } from '../interfaces'; /** @hidden */ declare type Fn = (...args: any[]) => any; /** @hidden */ declare type Obj1 = { [key in K1]?: V; }; /** @hidden */ declare type Path1 | Nil> = T extends Existent ? T[K1] : NonNullable[K1] | undefined; /** @hidden */ declare type DefinedPath1 | Nil> = NonUndefined[K1]>; /** @hidden */ declare type Obj2 = { [k1 in K1]?: Obj1; }; /** @hidden */ declare type Path2 | Nil> = Path1>; /** @hidden */ declare type DefinedPath2 | Nil> = DefinedPath1>; /** @hidden */ declare type Obj3 = { [k1 in K1]?: Obj2; }; /** @hidden */ declare type Path3 | Nil> = Path1>; /** @hidden */ declare type DefinedPath3 | Nil> = DefinedPath1>; /** * Invokes the method at `path` of `object`. * * Differences from lodash: * - only accepts an array for `path`, not a dot-separated string * * Contribution to minified bundle size, when it is the only function imported: * - Lodash: 6,253 bytes * - Micro-dash: 240 bytes */ export declare function invoke | Nil>(object: T, path: [K1, K2, K3], ...args: Parameters>): Path3 extends DefinedPath3 ? ReturnType> : ReturnType> | undefined; export declare function invoke | Nil>(object: T, path: [K1, K2], ...args: Parameters>): Path2 extends DefinedPath2 ? ReturnType> : ReturnType> | undefined; export declare function invoke | Nil>(object: T, path: [K1], ...args: Parameters>): Path1 extends DefinedPath1 ? ReturnType> : ReturnType> | undefined; export declare function invoke(object: object | Nil, path: []): undefined; export declare function invoke(object: object | Nil, path: Key[], ...args: any[]): any; export {};