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

Function materializedEncoding

packages/effect/src/ui/Query.ts:2394–2402  ·  view source on GitHub ↗
(
  encode: () => unknown
)

Source from the content-addressed store, hash-verified

2392 * snapshot throws. Never throws, since the check only reports.
2393 */
2394const materializedEncoding = (
2395 encode: () => unknown
2396): { readonly encoded: unknown } | undefined => {
2397 try {
2398 return { encoded: materialize(encode()) }
2399 } catch {
2400 return undefined
2401 }
2402}
2403
2404const lazy = <A>(make: () => A): () => A => {
2405 let made: { readonly value: A } | undefined

Callers 1

beginRunFunction · 0.85

Calls 2

materializeFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected