We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following piece of code is valid but it is parsed incorrectly:
import testData from './testData.json' assert { type: "json" };
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBDApgZxgEQIYw3AZlCEOAcgDoB6JVTbUgK2QgDti4NllFY4BvBATzCIAXHABEDZmLgBfANwAoIA
The output of tree-sitter parse is the following:
tree-sitter parse
(program [0, 0] - [1, 0] (import_statement [0, 0] - [0, 63] (import_clause [0, 7] - [0, 15] (identifier [0, 7] - [0, 15])) source: (string [0, 21] - [0, 38] (string_fragment [0, 22] - [0, 37])) (ERROR [0, 39] - [0, 62] (identifier [0, 39] - [0, 45]) (identifier [0, 48] - [0, 52]) (identifier [0, 55] - [0, 59]))))
Specification for this syntax can be found here: https://nodejs.org/api/esm.html#node-imports
The text was updated successfully, but these errors were encountered:
#238
Sorry, something went wrong.
No branches or pull requests
The following piece of code is valid but it is parsed incorrectly:
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBDApgZxgEQIYw3AZlCEOAcgDoB6JVTbUgK2QgDti4NllFY4BvBATzCIAXHABEDZmLgBfANwAoIA
The output of
tree-sitter parse
is the following:Specification for this syntax can be found here: https://nodejs.org/api/esm.html#node-imports
The text was updated successfully, but these errors were encountered: