(props: {
context: ITypiaContext;
metadata: MetadataSchema;
input: ts.Expression;
})
| 289 | }; |
| 290 | |
| 291 | const decode_array = (props: { |
| 292 | context: ITypiaContext; |
| 293 | metadata: MetadataSchema; |
| 294 | input: ts.Expression; |
| 295 | }): ts.Expression => |
| 296 | props.metadata.nullable || props.metadata.isRequired() === false |
| 297 | ? ts.factory.createCallExpression( |
| 298 | props.context.importer.internal("httpFormDataReadArray"), |
| 299 | undefined, |
| 300 | [ |
| 301 | props.input, |
| 302 | props.metadata.nullable |
| 303 | ? ts.factory.createNull() |
| 304 | : ts.factory.createIdentifier("undefined"), |
| 305 | ], |
| 306 | ) |
| 307 | : props.input; |
| 308 | } |
no test coverage detected
searching dependent graphs…