import { CurriedFunction2, Paths, Prop } from '../typings/types'; interface PathOr { >(path: [K], value: V, obj: O): O[K]; (path: [K], value: V, obj: any): V; (path: [K], value: V): { >(obj: O): O[K]; (obj: any): V; }; (path: [K]): { >(value: V, obj: O): O[K]; (value: V, obj: any): V; (value: V): { >(obj: O): O[K]; (obj: any): V; }; }; (path: Paths, value: any, obj: any): any; (path: Paths, value: any): (obj: any) => any; (path: Paths): CurriedFunction2; } /** * If the given, non-null object has a value at the given path, returns the * value at that path. Otherwise returns the provided default value. * * @param {[String]} paths The path to use. * @param {*} value The default value. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path` of the supplied object or the default value. * @example * * pathOr(['a', 'b'],'N/A', {a: {b: 2}}); //=> 2 * pathOr(['a', 'b'], 'N/A', {c: {b: 2}}); //=> "N/A" */ declare const _default: PathOr; export default _default;