MCPcopy Create free account
hub / github.com/Snapchat/Valdi / createConstVariable

Method createConstVariable

compiler/companion/src/JSXProcessor.ts:476–484  ·  view source on GitHub ↗
(
    variableName: string,
    expr: ts.Expression,
    transformContext: ts.TransformationContext,
  )

Source from the content-addressed store, hash-verified

474 }
475
476 private createConstVariable(
477 variableName: string,
478 expr: ts.Expression,
479 transformContext: ts.TransformationContext,
480 ): ts.VariableStatement {
481 const variable = transformContext.factory.createVariableDeclaration(variableName, undefined, undefined, expr);
482 const declarationList = transformContext.factory.createVariableDeclarationList([variable], ts.NodeFlags.Const);
483 return transformContext.factory.createVariableStatement(undefined, declarationList);
484 }
485
486 private appendInitializedVariable(
487 variablePrefix: string,

Callers 2

injectDeclarationsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected