* Focuses on a subset of keys of the current struct focus. * * **Details** * * - On a Lens, returns a Lens. * - On an Optional, returns an Optional. * - Does **not** work on union types (compile error). * * **Example** (Picking keys) * * ```ts import.met
(
this: Lens<S, A>,
keys: Keys,
..._err: ForbidUnion<A, "cannot use `pick` on a union type">
)
| 730 | * @see `.omit()` — the inverse operation |
| 731 | */ |
| 732 | pick<S, A, Keys extends ReadonlyArray<keyof A>>( |
| 733 | this: Lens<S, A>, |
| 734 | keys: Keys, |
| 735 | ..._err: ForbidUnion<A, "cannot use `pick` on a union type"> |
no outgoing calls
no test coverage detected