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

Function replaceEncoding

packages/effect/src/SchemaAST.ts:4380–4382  ·  view source on GitHub ↗
(ast: A, encoding: Encoding | undefined)

Source from the content-addressed store, hash-verified

4378
4379/** @internal */
4380export function replaceEncoding<A extends AST>(ast: A, encoding: Encoding | undefined): A {
4381 return ast.encoding === encoding ? ast : copyBody(ast, { encoding })
4382}
4383
4384/** @internal */
4385export function replaceContext<A extends AST>(ast: A, context: Context | undefined): A {

Callers 7

toCodecJsonMethod · 0.85
toCodecStringTreeMethod · 0.85
literalToStringFunction · 0.85
applyToLastLinkFunction · 0.85
outFunction · 0.85
appendTransformationFunction · 0.85
flipEncodingFunction · 0.85

Calls 1

copyBodyFunction · 0.85

Tested by

no test coverage detected