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

Method omit

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

* Focuses on all keys **except** the specified ones. * * **Details** * * - On a Lens, returns a Lens. * - On an Optional, returns an Optional. * - Does **not** work on union types (compile error). * * **Example** (Omitting keys) * * ```ts * import { O

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

Source from the content-addressed store, hash-verified

831 *
832 * const result = addLike({
833 * user: { posts: [{ title: "a", likes: 0 }, { title: "b", likes: 1 }] }
834 * })
835 * result.user.posts // => [{ title: "a", likes: 0 }, { title: "b", likes: 2 }]
836 * ```

Callers 15

query.test.tsFile · 0.65
bulkSetInternalFunction · 0.65
batchSetFunction · 0.65
makeFunction · 0.65
UsersApiClass · 0.65
Struct.tst.tsFile · 0.65
Optic.tst.tsFile · 0.65
Tuple.tst.tsFile · 0.65
RpcGroup.tst.tsFile · 0.65

Implementers 1

OptionalImplrepos/effect/packages/effect/src/Optic

Calls

no outgoing calls

Tested by

no test coverage detected