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

Function appendTransformation

packages/effect/src/SchemaAST.ts:3465–3474  ·  view source on GitHub ↗
(
  from: AST,
  transformation:
    | SchemaTransformation.Transformation<any, any, any, any>
    | SchemaTransformation.Middleware<any, any, any, any, any, any>,
  to: A
)

Source from the content-addressed store, hash-verified

3463}
3464
3465function appendTransformation<A extends AST>(
3466 from: AST,
3467 transformation:
3468 | SchemaTransformation.Transformation<any, any, any, any>
3469 | SchemaTransformation.Middleware<any, any, any, any, any, any>,
3470 to: A
3471): A {
3472 const link = new Link(from, transformation)
3473 return replaceEncoding(to, to.encoding ? [...to.encoding, link] : [link])
3474}
3475
3476/** @internal */
3477export function brand(ast: AST, brand: string): AST {

Callers 3

middlewareDecodingFunction · 0.85
middlewareEncodingFunction · 0.85
decodeToFunction · 0.85

Calls 1

replaceEncodingFunction · 0.85

Tested by

no test coverage detected