Skip to content

fix: parse export type *#358

Open
gthb wants to merge 4 commits into
tree-sitter:masterfrom
gthb:fix-export-type-star
Open

fix: parse export type *#358
gthb wants to merge 4 commits into
tree-sitter:masterfrom
gthb:fix-export-type-star

Conversation

@gthb

@gthb gthb commented Mar 8, 2026

Copy link
Copy Markdown

What

Support export type * and export type * as X

Why

Fixes #348 — current grammar only accepts export type { ... } and export { type ... } and yields ERROR nodes for the above.

Also

Add test cases for export { type X } and export { type X as Y }

These were already supported, but AFAICT not covered in any test.

gthb added 4 commits March 8, 2026 16:49
Add test cases for tree-sitter#348:

- `export type * from '...'`
- `export type * as Name from '...'`

These are valid TypeScript (since 3.8) but currently produce ERROR nodes.
Add `*` and `* as Name` cases to the `export type` branch.

Fixes tree-sitter#348
Cover more `namespace_export` forms:
- `export type * as default from './module'`
- `export type * as "string-name" from './module'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: export type * as Name from './module' produces ERROR node for valid syntax

1 participant