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

Method notUndefined

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

* Filters out `undefined` from the focus, producing a Prism. * `getResult` fails when the focus is `undefined`. * * **Example** (Filtering undefined values) * * ```ts import.meta.vitest * import { Optic, Result } from "effect" * * const _defined = Optic.id<number | un

(this: Prism<S, A>)

Source from the content-addressed store, hash-verified

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
800 /**

Callers 2

Optic.tst.tsFile · 0.65
Optic.test.tsFile · 0.65

Implementers 1

OptionalImplpackages/effect/src/Optic.ts

Calls

no outgoing calls

Tested by

no test coverage detected