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

Function mapLink

packages/effect/src/SchemaAST.ts:3404–3407  ·  view source on GitHub ↗
(link: Link, f: (ast: AST) => AST)

Source from the content-addressed store, hash-verified

3402
3403/** @internal */
3404export function mapLink(link: Link, f: (ast: AST) => AST): Link {
3405 const to = f(link.to)
3406 return to === link.to ? link : new Link(to, link.transformation)
3407}
3408
3409function updateLastLink(encoding: Encoding, f: (ast: AST) => AST): Encoding {
3410 const links = encoding

Callers 1

updateLastLinkFunction · 0.85

Calls 1

fFunction · 0.50

Tested by

no test coverage detected