(schema: any)
| 153 | ): Struct<Fields> { |
| 154 | const result = S.Struct(fields).annotate(concurrencyUnbounded) |
| 155 | const allowVoidMake = (schema: any): any => { |
| 156 | // Normalize omitted input to an empty object so optional/default-only structs can be constructed with make(). |
| 157 | const origMake: any = schema.make |
| 158 | const origMakeOption: any = schema.makeOption |
| 159 | const origMakeEffect: any = schema.makeEffect |
| 160 | schema.make = function(this: any, input: any, options?: any) { |
| 161 | return origMake.call(this, input === undefined ? {} : input, options) |
| 162 | } |
| 163 | schema.makeOption = function(this: any, input: any, options?: any) { |
| 164 | return origMakeOption.call(this, input === undefined ? {} : input, options) |
| 165 | } |
| 166 | schema.makeEffect = function(this: any, input: any, options?: any) { |
| 167 | return origMakeEffect.call(this, input === undefined ? {} : input, options) |
| 168 | } |
| 169 | return schema |
| 170 | } |
| 171 | // eslint-disable-next-line @typescript-eslint/unbound-method, @typescript-eslint/no-unsafe-assignment |
| 172 | const origMapFields: any = result.mapFields |
| 173 | // eslint-disable-next-line @typescript-eslint/unbound-method, @typescript-eslint/no-unsafe-assignment |
no outgoing calls
no test coverage detected
searching dependent graphs…