( schema: Schema.Struct<Fields> )
| 7 | import * as Util from "./TestUtils.js" |
| 8 | |
| 9 | const structTypeSchema = <Fields extends Schema.Struct.Fields>( |
| 10 | schema: Schema.Struct<Fields> |
| 11 | ): Schema.Struct<{ [K in keyof Fields]: Schema.Schema<Schema.Schema.Type<Fields[K]>> }> => |
| 12 | Schema.Struct(Record.map(schema.fields, (field) => { |
| 13 | switch (field.ast._tag) { |
| 14 | case "PropertySignatureDeclaration": |
| 15 | return Schema.make(AST.typeAST(field.ast.type)) |
| 16 | case "PropertySignatureTransformation": |
| 17 | return Schema.make(AST.typeAST(field.ast.to.type)) |
| 18 | default: |
| 19 | return Schema.make(AST.typeAST(field.ast)) |
| 20 | } |
| 21 | })) as any |
| 22 | |
| 23 | describe("SchemaUserland", () => { |
| 24 | it("structTypeSchema", () => { |
no test coverage detected