| 3346 | f: (fields: Fields) => To, |
| 3347 | options?: { |
| 3348 | readonly unsafePreserveChecks?: boolean | undefined |
| 3349 | } | undefined |
| 3350 | ): Struct<Simplify<Readonly<To>>> |
| 3351 | } |
| 3352 | |
| 3353 | function makeStruct<const Fields extends Struct.Fields>(ast: SchemaAST.Objects, fields: Fields): Struct<Fields> { |
| 3354 | return make(ast, { |
| 3355 | fields, |
| 3356 | mapFields<To extends Struct.Fields>( |
| 3357 | this: Struct<Fields>, |
| 3358 | f: (fields: Fields) => To, |
| 3359 | options?: { |
| 3360 | readonly unsafePreserveChecks?: boolean | undefined |
| 3361 | } | undefined |
| 3362 | ): Struct<To> { |
| 3363 | const fields = f(this.fields) |
| 3364 | return makeStruct(SchemaAST.struct(fields, options?.unsafePreserveChecks ? this.ast.checks : undefined), fields) |
| 3365 | } |