tree-sitter / tree-sitter-typescript

TypeScript grammar for tree-sitter
MIT License
335 stars 104 forks source link

Unclear how to use `import_require_clause` #210

Closed HirenHiranandani-at closed 5 months ago

HirenHiranandani-at commented 2 years ago

The following piece of code:

require('y')

... is valid but it is parsed into:

(call_expression function: (identifier) arguments: (arguments (string (string_fragment))))

Based on reading the definition of import_require_clause, it's unclear what matches import_require_clause.

Gerrit0 commented 1 year ago

likely:

import x = require("x")