import { StringToPath } from "./string-to-path"; import { AnyArray, AnyObject, Sequence, IsNumericKey } from "./types"; import { GetArrayValue, IsTuple } from "./tuple"; export declare type Get = StringPath extends unknown ? Get_, Default> : never; declare type Get_ = { 0: Value extends AnyObject ? GetKey : Default; 1: Value extends undefined ? Default : Value; }[Index extends Path["length"] ? 1 : 0]; declare type GetKey = Path[Index] extends keyof Value ? Get_ : Value extends AnyArray ? IsNumericKey extends false ? Default : IsTuple extends true ? Default : Get_ | undefined, Path, Default, Sequence[Index]> : Default; interface GetFunction { (object: Obj, path: Path, defaultValue?: Default): Get; } export declare const get: GetFunction; export {};