( value: Tag, fields: Fields )
| 6181 | * @since 3.10.0 |
| 6182 | */ |
| 6183 | export function TaggedStruct<const Tag extends SchemaAST.LiteralValue, const Fields extends Struct.Fields>( |
| 6184 | value: Tag, |
| 6185 | fields: Fields |
| 6186 | ): TaggedStruct<Tag, Fields> { |
| 6187 | return Struct({ _tag: tag(value), ...fields }) |
| 6188 | } |
| 6189 | |
| 6190 | /** |
| 6191 | * Recursively flatten any nested Schema.Union members into a single tuple of leaf schemas. |
no test coverage detected