/** @module object.ts */ import { Unpacked } from './helper-types'; /** * Extract new object from an obj given an array of keys * * @example * pluckObj( 'a', 'c' )( { a: 1, b: 2, c: 3}) // { a: 1, c: 3 } * * :: ( k1, k2,...k3 ) -> o -> { k1: o[ k1 ], k2: o[ k2 ], ... k3: o[ k3 ] } */ export declare const pluckObj: (...itemsToPluck: string[]) => (obj: {}) => {}; /** * prop */ /** * Retrieves an object values given its property (key) * * @example * prop( 'a', { a : 1 } ) // 1 * * :: k -> o -> o[ k ] */ export declare function prop(prop: K, obj: O): O[K]; export declare function prop(prop: K): (obj: { [k in K]: V; } & { [k: string]: any; }) => V; /** * Retrieves an object values given its property name (key). Curried, not too strongly typed. * * @example * shallowProp( 'a' , { a: 1 , b: 2} ) // 1 * * :: k -> o -> o[ k ] */ export declare const shallowProp: import("./helper-types").Curried2 & import("./helper-types").Function2; /** * Flipped version of `prop`. Retrieves an objects values given its property name (key). Curried * * @example * flippedProp( { a: 1}, 'a' ) // 1 * * :: o -> k -> o[ k ] */ export declare const flippedProp: (obj: T) => (_prop: K) => T[K]; export declare function assoc_

(prop: P, value: V, obj: O): { [p in P]: V; } & O; export declare function assoc_

(prop: P, value: V): (obj: O) => { [p in P]: V; } & O; export declare function assoc_

(prop: P): (value: V) => (obj: O) => { [p in P]: V; } & O; export declare function assoc(obj: O, prop: P, value: V): { [p in P]: V; } & O; export declare function assoc(obj: O, prop: P): (value: V) => { [p in P]: V; } & O; export declare function assoc(obj: O):

(prop: P) => (value: V) => { [p in P]: V; } & O; export declare function assign(target: T, source: S): S & T; export declare function assign(target: T): (source: S) => S & T; export declare const _pathValue: any; export declare function getPathValue(path: [K1], obj: L): Unpacked<[K1]> extends K1 ? L[K1] : unknown; export declare function getPathValue(path: [K1, K2], obj: L): L[K1][K2]; export declare function getPathValue(path: [K1, K2, K3], obj: L): L[K1][K2][K3]; export declare function getPathValue(path: [K1, K2, K3, K4], obj: L): L[K1][K2][K3][K4]; export declare function getPathValue(path: [K1, K2, K3, K4, K5], obj: L): L[K1][K2][K3][K4][K5]; export declare function getPathValue(path: [K1, K2, K3, K4, K5, K6], obj: L): L[K1][K2][K3][K4][K5][K6]; export declare function getPathValue(path: [K1, K2, K3, K4, K5, K6, K7], obj: L): L[K1][K2][K3][K4][K5][K6][K7]; export declare function getPathValue(path: [K1, K2, K3, K4, K5, K6, K7, K8], obj: L): L[K1][K2][K3][K4][K5][K6][K7][K8]; export declare function getPathValue(path: [K1, K2, K3, K4, K5, K6, K7, K8, K9], obj: L): L[K1][K2][K3][K4][K5][K6][K7][K8][K9]; export declare function getPathValue(path: [K1, K2, K3, K4, K5, K6, K7, K8, K9, K10], obj: L): L[K1][K2][K3][K4][K5][K6][K7][K8][K9][K10]; export declare const path: typeof getPathValue; /** * Retrieves the value of an obj item at given index or key * @param obj array to get item * @example * valueAt(2,[1,2,3]) // 3 */ export declare const valueAt: (obj: G, k: K) => G[K]; /** * Todo */ export declare const keys: (obj: { [k: string]: V; }) => string[]; /** * Todo */ export declare const values: (obj: O) => O[keyof O][];