MCPcopy Create free account
hub / github.com/samchon/typia / decode_value

Function decode_value

packages/core/src/programmers/http/HttpFormDataProgrammer.ts:269–289  ·  view source on GitHub ↗
(props: {
    context: ITypiaContext;
    type: Atomic.Literal | "blob" | "file";
    coalesce: boolean;
    input: ts.Expression;
  })

Source from the content-addressed store, hash-verified

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;

Callers 1

decode_regular_propertyFunction · 0.70

Calls 1

internalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…