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

Function unwrap

packages/effect/src/internal/config.ts:646–655  ·  view source on GitHub ↗
(wrapped: Config.Config.Wrap<A>)

Source from the content-addressed store, hash-verified

644 * @internal
645 */
646export const unwrap = <A>(wrapped: Config.Config.Wrap<A>): Config.Config<A> => {
647 if (isConfig(wrapped)) {
648 return wrapped
649 }
650 return struct(
651 Object.fromEntries(
652 Object.entries(wrapped).map(([k, a]) => [k, unwrap(a as any)])
653 )
654 ) as any
655}
656
657/** @internal */
658export const validate = dual<

Callers

nothing calls this directly

Calls 4

isConfigFunction · 0.85
entriesMethod · 0.80
structFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected