import { type ObjectKey, type SimplifyTopLevel } from "../common"; import { type Adaptor } from "../common/types/adaptor"; import { type GetPropsWithValue } from "./types/getPropsWithValue"; type ComputeResultWithPickIsObject>> = SimplifyTopLevel, keyof GenericInput>> & Partial | GetPropsWithValue | GetPropsWithValue, keyof GenericInput>>>>; /** * Selects properties from an object. * * **Supported call styles:** * - Classic: `pick(input, pickValue)` → returns a new object * - Curried: `pick(pickValue)` → returns a function waiting for the input * * The `pickValue` can be a key array or a map of keys to booleans. * The input object is not mutated. * * ```ts * O.pick( * { * name: "Ada", * age: 36, * }, * ["name"], * ); // { name: "Ada" } * * O.pick( * { * name: "Ada", * age: 36, * active: true, * }, * { * name: true, * active: true, * }, * ); // { name: "Ada", active: true } * * pipe( * { * role: "admin", * level: 3, * }, * O.pick(["role"]), * ); // { role: "admin" } * * ``` * * @see [`O.omit`](https://utils.duplojs.dev/en/v1/api/object/omit) For removing keys * @see https://utils.duplojs.dev/en/v1/api/object/pick * * @namespace O * */ export declare function pick> | readonly (keyof GenericInput)[]>(pickValue: GenericPickValue): (input: GenericInput) => GenericPickValue extends Partial> ? ComputeResultWithPickIsObject : SimplifyTopLevel[number]>>; export declare function pick> | readonly (keyof GenericInput)[]>(input: GenericInput, pickValue: GenericPickValue): GenericPickValue extends Partial> ? ComputeResultWithPickIsObject : SimplifyTopLevel[number]>>; export {};