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

Function unwrap

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

Source from the content-addressed store, hash-verified

631 * @internal
632 */
633export const unwrap = <A>(wrapped: Config.Config.Wrap<A>): Config.Config<A> => {
634 if (isConfig(wrapped)) {
635 return wrapped
636 }
637 return struct(
638 Object.fromEntries(
639 Object.entries(wrapped).map(([k, a]) => [k, unwrap(a as any)])
640 )
641 ) as any
642}
643
644/** @internal */
645export 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…