MCPcopy Create free account
hub / github.com/Effect-TS/effect / pick

Method pick

packages/effect/src/Optic.ts:732–732  ·  view source on GitHub ↗

* 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">
  )

Source from the content-addressed store, hash-verified

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">

Callers 11

GroupsApiClass · 0.65
Struct.tst.tsFile · 0.65
Optic.tst.tsFile · 0.65
Tuple.tst.tsFile · 0.65
Tuple.tst.tsFile · 0.65
Optic.test.tsFile · 0.65
Context.test.tsFile · 0.65
Tuple.test.tsFile · 0.65
Struct.test.tsFile · 0.65
Schema.test.tsFile · 0.65
pickMethod · 0.65

Implementers 1

OptionalImplpackages/effect/src/Optic.ts

Calls

no outgoing calls

Tested by

no test coverage detected