(props: {
context: ITypiaContext;
type: Atomic.Literal | "blob" | "file";
coalesce: boolean;
input: ts.Expression;
})
| 267 | }; |
| 268 | |
| 269 | const decode_value = (props: { |
| 270 | context: ITypiaContext; |
| 271 | type: Atomic.Literal | "blob" | "file"; |
| 272 | coalesce: boolean; |
| 273 | input: ts.Expression; |
| 274 | }) => { |
| 275 | const call = ts.factory.createCallExpression( |
| 276 | props.context.importer.internal( |
| 277 | `httpFormDataRead${NamingConvention.capitalize(props.type)}`, |
| 278 | ), |
| 279 | undefined, |
| 280 | [props.input], |
| 281 | ); |
| 282 | return props.coalesce |
| 283 | ? ts.factory.createBinaryExpression( |
| 284 | call, |
| 285 | ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), |
| 286 | ts.factory.createIdentifier("undefined"), |
| 287 | ) |
| 288 | : call; |
| 289 | }; |
| 290 | |
| 291 | const decode_array = (props: { |
| 292 | context: ITypiaContext; |
no test coverage detected
searching dependent graphs…