Closed kungfooman closed 10 months ago
Example:
/** @typedef {1n | 2n} BigIntOneOrTwo */
For example in Babel-TS the AST of 1n is:
1n
{ "type": "BigIntLiteral", "start": 0, "end": 2, "loc": { "start": { "line": 1, "column": 0, "index": 0 }, "end": { "line": 1, "column": 2, "index": 2 } }, "extra": { "rawValue": "1", "raw": "1n" }, "value": "1" }
Boiling the crucial information down, we can have this JSON:
{ "type": "bigint", "literal": "1" }
Whereas the simple bigint keyword turns into:
bigint
{ "type": "bigint" }
Example:
For example in Babel-TS the AST of
1n
is:Boiling the crucial information down, we can have this JSON:
Whereas the simple
bigint
keyword turns into: