MCPcopy Index your code
hub / github.com/nodejs/node / createNumericLiteral

Function createNumericLiteral

test/fixtures/snapshot/typescript.js:22892–22899  ·  view source on GitHub ↗
(value, numericLiteralFlags)

Source from the content-addressed store, hash-verified

22890 }
22891 // @api
22892 function createNumericLiteral(value, numericLiteralFlags) {
22893 if (numericLiteralFlags === void 0) { numericLiteralFlags = 0 /* TokenFlags.None */; }
22894 var node = createBaseLiteral(8 /* SyntaxKind.NumericLiteral */, typeof value === "number" ? value + "" : value);
22895 node.numericLiteralFlags = numericLiteralFlags;
22896 if (numericLiteralFlags & 384 /* TokenFlags.BinaryOrOctalSpecifier */)
22897 node.transformFlags |= 1024 /* TransformFlags.ContainsES2015 */;
22898 return node;
22899 }
22900 // @api
22901 function createBigIntLiteral(value) {
22902 var node = createBaseLiteral(9 /* SyntaxKind.BigIntLiteral */, typeof value === "string" ? value : ts.pseudoBigIntToString(value) + "n");

Callers 3

createLiteralLikeNodeFunction · 0.85
createVoidZeroFunction · 0.85
asExpressionFunction · 0.85

Calls 1

createBaseLiteralFunction · 0.85

Tested by

no test coverage detected