(
identifier: string
)
| 14127 | return this.rebuild(SchemaAST.appendChecks(this.ast, checks)) |
| 14128 | } |
| 14129 | static extend( |
| 14130 | identifier: string |
| 14131 | ) { |
| 14132 | return ( |
| 14133 | schema: Struct.Fields | Struct<Struct.Fields>, |
| 14134 | annotations?: Annotations.Declaration<any, readonly [any]> |
| 14135 | ) => { |
| 14136 | const extension = isStruct(schema) ? schema : Struct(schema) |
| 14137 | const fields = { ...struct.fields, ...extension.fields } |
| 14138 | const ast = SchemaAST.struct(fields, struct.ast.checks, { identifier }) |
| 14139 | return makeClass( |
| 14140 | this, |
| 14141 | identifier, |
| 14142 | makeStruct(SchemaAST.appendChecks(ast, extension.ast.checks), fields), |
| 14143 | annotations, |
| 14144 | proto |
| 14145 | ) |
| 14146 | } |
| 14147 | } |
| 14148 | static mapFields<To extends Struct.Fields>( |
| 14149 | f: (fields: S["fields"]) => To, |
| 14150 | options?: { |
nothing calls this directly
no test coverage detected