MCPcopy
hub / github.com/Effect-TS/effect / makeTransformationClass

Function makeTransformationClass

packages/effect/src/Schema.ts:3802–3822  ·  view source on GitHub ↗
(
  from: From,
  to: To,
  ast: AST.AST
)

Source from the content-addressed store, hash-verified

3800}
3801
3802function makeTransformationClass<From extends Schema.Any, To extends Schema.Any, R>(
3803 from: From,
3804 to: To,
3805 ast: AST.AST
3806): transformOrFail<From, To, R> {
3807 return class TransformationClass
3808 extends make<Schema.Type<To>, Schema.Encoded<From>, Schema.Context<From> | Schema.Context<To> | R>(ast)
3809 {
3810 static override annotations(annotations: Annotations.Schema<Schema.Type<To>>) {
3811 return makeTransformationClass<From, To, R>(
3812 this.from,
3813 this.to,
3814 mergeSchemaAnnotations(this.ast, annotations)
3815 )
3816 }
3817
3818 static from = from
3819
3820 static to = to
3821 }
3822}
3823
3824/**
3825 * Create a new `Schema` by transforming the input and output of an existing `Schema`

Callers 2

Schema.tsFile · 0.85
annotationsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected