Closed
Description
What code were you trying to parse?
typescriptEstree.parse('true', {range: false, loc: false})
What did you expect to happen?
The returned node should not include the range
or loc
properties.
What actually happened?
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": true,
"raw": "true",
"range": [
0,
4
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
}
},
"range": [
0,
4
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
}
}
],
"sourceType": "script",
"range": [
0,
4
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 4
}
}
}
Versions
package | version |
---|---|
@typescript-eslint/typescript-estree |
1.11.0 |
TypeScript |
3.5.3 |
node |
12.6.0 |
npm |
6.10.0 |