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

Function replaceEncoding

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

Source from the content-addressed store, hash-verified

3342
3343/** @internal */
3344export function replaceEncoding<A extends AST>(ast: A, encoding: Encoding | undefined): A {
3345 if (ast.encoding === encoding) {
3346 return ast
3347 }
3348 return modifyOwnPropertyDescriptors(ast, (d) => {
3349 d.encoding.value = encoding
3350 })
3351}
3352
3353/** @internal */
3354export function replaceContext<A extends AST>(ast: A, context: Context | undefined): A {

Callers 14

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

Calls 1

Tested by

no test coverage detected