MCPcopy Create free account
hub / github.com/effect-app/libs / withDefaultMake

Function withDefaultMake

packages/effect-app/src/Schema/ext.ts:479–485  ·  view source on GitHub ↗
(s: Self)

Source from the content-addressed store, hash-verified

477 schema.pipe(S.withConstructorDefault(Effect.sync(() => new Set())))
478
479export const withDefaultMake = <Self extends S.Top>(s: Self) => {
480 const a = Object.assign(S.decodeSync(s as any) as WithDefaults<Self>, s)
481 Object.setPrototypeOf(a, s)
482 return a
483
484 // return s as Self & WithDefaults<Self>
485}
486
487export type WithDefaults<Self extends S.Top> = (
488 i: Self["Encoded"],

Callers 1

brandedStringIdFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…