MCPcopy Create free account
hub / github.com/effect-app/libs / pick

Method pick

repos/effect/packages/effect/src/Optic.ts:796–796  ·  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 * impor

(
    this: Lens<S, A>,
    keys: Keys,
    ..._err: ForbidUnion<A, "cannot use `pick` on a union type">
  )

Source from the content-addressed store, hash-verified

794 *
795 * @since 4.0.0
796 */
797 notUndefined<S, A>(this: Prism<S, A>): Prism<S, Exclude<A, undefined>>
798 notUndefined<S, A>(this: Optional<S, A>): Optional<S, Exclude<A, undefined>>
799

Callers 15

query.test.tsFile · 0.65
rawQuery.test.tsFile · 0.65
makeSQLStoreIntFunction · 0.65
makeSQLiteStorePerNsFunction · 0.65
selectPerRowFunction · 0.65
Cosmos.tsFile · 0.65
Pg.tsFile · 0.65
query.tsFile · 0.65
schema.test.tsFile · 0.65
ext.tsFile · 0.65
GroupsApiClass · 0.65
Struct.tst.tsFile · 0.65

Implementers 1

OptionalImplrepos/effect/packages/effect/src/Optic

Calls

no outgoing calls

Tested by

no test coverage detected