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

Function modifyOwnPropertyDescriptors

packages/effect/src/SchemaAST.ts:3325–3334  ·  view source on GitHub ↗
(
  ast: A,
  f: (
    d: { [P in keyof A]: TypedPropertyDescriptor<A[P]> }
  ) => void
)

Source from the content-addressed store, hash-verified

3323}
3324
3325function modifyOwnPropertyDescriptors<A extends AST>(
3326 ast: A,
3327 f: (
3328 d: { [P in keyof A]: TypedPropertyDescriptor<A[P]> }
3329 ) => void
3330): A {
3331 const d = Object.getOwnPropertyDescriptors(ast)
3332 f(d)
3333 return Object.create(Object.getPrototypeOf(ast), d)
3334}
3335
3336const contextOwners = new WeakMap<AST, AST>()
3337

Callers 5

replaceEncodingFunction · 0.85
replaceContextFunction · 0.85
annotateFunction · 0.85
replaceChecksFunction · 0.85
SchemaAST.tsFile · 0.85

Calls 1

fFunction · 0.50

Tested by

no test coverage detected