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

Function copy

packages/effect/src/SchemaAST.ts:4358–4360  ·  view source on GitHub ↗
(ast: A, changes: Partial<AST>)

Source from the content-addressed store, hash-verified

4356const bodyOwners = new WeakMap<AST, AST>()
4357
4358function copy<A extends AST>(ast: A, changes: Partial<AST>): A {
4359 return Object.assign(Object.create(Object.getPrototypeOf(ast)), ast, changes) as A
4360}
4361
4362function copyBody<A extends AST>(ast: A, changes: Pick<Partial<AST>, "context" | "encoding">): A {
4363 const out = copy(ast, changes)

Callers 10

flipChecksFunction · 0.70
recurMethod · 0.70
flipMethod · 0.70
copyBodyFunction · 0.70
getContextOwnerFunction · 0.70
annotateFunction · 0.70
replaceChecksFunction · 0.70
projectTypeFunction · 0.70
flipASTFunction · 0.70
projectFunction · 0.70

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected