MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / getUnsafe

Function getUnsafe

packages/@contentlayer/utils/src/effect/Option.ts:5–11  ·  view source on GitHub ↗
(option: Option.Option<A>)

Source from the content-addressed store, hash-verified

3export * from '@effect-ts/core/Option'
4
5export const getUnsafe = <A>(option: Option.Option<A>): A => {
6 if (Option.isSome(option)) {
7 return option.value
8 }
9
10 throw new Error('Option.getUnsafe: Option is None')
11}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…