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

Function applyToSelfOrLastLinkEncoding

packages/effect/src/SchemaAST.ts:3427–3432  ·  view source on GitHub ↗
(f: (ast: AST) => AST)

Source from the content-addressed store, hash-verified

3425
3426/** @internal */
3427export function applyToSelfOrLastLinkEncoding(f: (ast: AST) => AST) {
3428 function out(ast: AST): AST {
3429 return ast.encoding ? replaceEncoding(ast, updateLastLink(ast.encoding, out)) : f(ast)
3430 }
3431 return memoize(out)
3432}
3433
3434/** @internal */
3435export function applyToSelfOrLastLinkEncodingIdempotent(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected