( from: From, filter: (a: Schema.Type<From>, options: ParseOptions, self: AST.Refinement) => option_.Option<ParseResult.ParseIssue>, ast: AST.AST )
| 3602 | } |
| 3603 | |
| 3604 | function makeRefineClass<From extends Schema.Any, A>( |
| 3605 | from: From, |
| 3606 | filter: (a: Schema.Type<From>, options: ParseOptions, self: AST.Refinement) => option_.Option<ParseResult.ParseIssue>, |
| 3607 | ast: AST.AST |
| 3608 | ): refine<A, From> { |
| 3609 | return class RefineClass extends make<A, Schema.Encoded<From>, Schema.Context<From>>(ast) { |
| 3610 | static override annotations(annotations: Annotations.Schema<A>): refine<A, From> { |
| 3611 | return makeRefineClass(this.from, this.filter, mergeSchemaAnnotations(this.ast, annotations)) |
| 3612 | } |
| 3613 | |
| 3614 | static [RefineSchemaId] = from |
| 3615 | |
| 3616 | static from = from |
| 3617 | |
| 3618 | static filter = filter |
| 3619 | |
| 3620 | static make = (a: Schema.Type<From>, options?: MakeOptions): A => { |
| 3621 | return getDisableValidationMakeOption(options) ? a : ParseResult.validateSync(this)(a) |
| 3622 | } |
| 3623 | } |
| 3624 | } |
| 3625 | |
| 3626 | /** |
| 3627 | * @category api interface |
no outgoing calls
no test coverage detected