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.
Update AST for TypeParameterInstantiation when type keyword used #373
Closed
Description
@Andy-MS For this source:
foo<A>();
foo<number>();
...we are currently consistently using TSTypeReference
for each foo
example - i.e. for both type argument A
and type argument number
.
I observed this as a difference between this parser and babylon, and inferred that, when the type argument is a type keyword, you just the type
directly in the AST.
This seems to make a lot of sense, so I will update the AST in this project accordingly.
Example diff:
- "type": "TSTypeReference",
- "typeName": Object {
- "loc": Object {
- "end": Object {
- "column": 10,
- "line": 2,
- },
- "start": Object {
- "column": 4,
- "line": 2,
- },
- },
- "range": Array [
- 14,
- 20,
- ],
- "type": "TSNumberKeyword",
- },
+ "type": "TSNumberKeyword",
Metadata
Metadata
Assignees
Labels
No labels