(props: {
context: ITypiaContext;
type: Atomic.Literal;
coalesce: boolean;
input: ts.Expression;
})
| 299 | }; |
| 300 | |
| 301 | const decode_value = (props: { |
| 302 | context: ITypiaContext; |
| 303 | type: Atomic.Literal; |
| 304 | coalesce: boolean; |
| 305 | input: ts.Expression; |
| 306 | }) => { |
| 307 | const call = ts.factory.createCallExpression( |
| 308 | props.context.importer.internal( |
| 309 | `httpQueryRead${NamingConvention.capitalize(props.type)}`, |
| 310 | ), |
| 311 | undefined, |
| 312 | [props.input], |
| 313 | ); |
| 314 | return props.coalesce |
| 315 | ? ts.factory.createBinaryExpression( |
| 316 | call, |
| 317 | ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), |
| 318 | ts.factory.createIdentifier("undefined"), |
| 319 | ) |
| 320 | : call; |
| 321 | }; |
| 322 | |
| 323 | const decode_array = (props: { |
| 324 | context: ITypiaContext; |
no test coverage detected
searching dependent graphs…