MCPcopy Index your code
hub / github.com/react/react / mapOr

Method mapOr

compiler/packages/babel-plugin-react-compiler/src/Utils/Result.ts:31–31  ·  view source on GitHub ↗
(fallback: U, fn: (val: T) => U)

Source from the content-addressed store, hash-verified

29 * function call, it is recommended to use {@link mapOrElse}, which is lazily evaluated.
30 */
31 mapOr<U>(fallback: U, fn: (val: T) => U): U;
32 /*
33 * Maps a `Result<T, E>` to `U` by applying fallback function default to a contained `Err` value,
34 * or function `fn` to a contained `Ok` value.

Callers 1

Result-test.tsFile · 0.65

Implementers 2

OkImplcompiler/packages/babel-plugin-react-c
ErrImplcompiler/packages/babel-plugin-react-c

Calls

no outgoing calls

Tested by

no test coverage detected