This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
JSXMemberExpression incorrectly marked as a JSXIdentifier #257
Closed
Description
What version of TypeScript are you using?
2.3.2
What version of typescript-eslint-parser
are you using?
What code were you trying to parse?
var foo: Nested.Namespace.Type;
What did you expect to happen?
JSXIdentifier
nodes should not have property
and object
keys. There is one in this AST that should be a JSXMemberExpression
.
What happened?
{
"type": "VariableDeclaration",
"range": [
0,
30
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 30
}
},
"declarations": [
{
"type": "VariableDeclarator",
"range": [
4,
30
],
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 30
}
},
"id": {
"type": "Identifier",
"range": [
4,
7
],
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"name": "foo",
"typeAnnotation": {
"type": "TypeAnnotation",
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 30
}
},
"range": [
9,
30
],
"typeAnnotation": {
"type": "TSTypeReference",
"range": [
9,
30
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 30
}
},
"typeName": {
"type": "JSXMemberExpression",
"range": [
9,
30
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 30
}
},
"object": {
"type": "JSXIdentifier",
"range": [
9,
25
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 25
}
},
"object": {
"type": "JSXIdentifier",
"range": [
9,
15
],
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"name": "Nested"
},
"property": {
"type": "JSXIdentifier",
"range": [
16,
25
],
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 25
}
},
"name": "Namespace"
}
},
"property": {
"type": "JSXIdentifier",
"range": [
26,
30
],
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 30
}
},
"name": "Type"
}
}
}
}
},
"init": null
}
],
"kind": "var"
}