babel-parser: typescript: add missing bigint keyword (#9230)
This commit is contained in:
parent
d1aa665657
commit
b5177ce290
@ -45,6 +45,8 @@ function keywordTypeFromName(
|
||||
return "TSAnyKeyword";
|
||||
case "boolean":
|
||||
return "TSBooleanKeyword";
|
||||
case "bigint":
|
||||
return "TSBigIntKeyword";
|
||||
case "never":
|
||||
return "TSNeverKeyword";
|
||||
case "number":
|
||||
|
||||
@ -1157,6 +1157,7 @@ export type TsKeywordTypeType =
|
||||
| "TSNumberKeyword"
|
||||
| "TSObjectKeyword"
|
||||
| "TSBooleanKeyword"
|
||||
| "TSBigIntKeyword"
|
||||
| "TSStringKeyword"
|
||||
| "TSSymbolKeyword"
|
||||
| "TSVoidKeyword"
|
||||
|
||||
@ -9,3 +9,4 @@ let st: string;
|
||||
let sy: symbol;
|
||||
let u: undefined;
|
||||
let v: void;
|
||||
let n: bigint;
|
||||
|
||||
@ -1,29 +1,29 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 169,
|
||||
"end": 184,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 11,
|
||||
"column": 12
|
||||
"line": 12,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 169,
|
||||
"end": 184,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 11,
|
||||
"column": 12
|
||||
"line": 12,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
@ -919,6 +919,87 @@
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start": 170,
|
||||
"end": 184,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 12,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 12,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start": 174,
|
||||
"end": 183,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 12,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 12,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 174,
|
||||
"end": 183,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 12,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 12,
|
||||
"column": 13
|
||||
},
|
||||
"identifierName": "n"
|
||||
},
|
||||
"name": "n",
|
||||
"typeAnnotation": {
|
||||
"type": "TSTypeAnnotation",
|
||||
"start": 175,
|
||||
"end": 183,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 12,
|
||||
"column": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 12,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"typeAnnotation": {
|
||||
"type": "TSBigIntKeyword",
|
||||
"start": 177,
|
||||
"end": 183,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 12,
|
||||
"column": 7
|
||||
},
|
||||
"end": {
|
||||
"line": 12,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"init": null
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user