Skip to content

test(ts-differential): pin constructs the SegaraRai fork regresses - #14

Merged
inth3shadows merged 2 commits into
mainfrom
test/ts-fixtures-segararai-regressions
Nov 6, 2026
Merged

inth3shadows merged 2 commits into
mainfrom
test/ts-fixtures-segararai-regressions

Conversation

@inth3shadows

@inth3shadows inth3shadows commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Adds four strict (non-gap) fixtures to __tests__/fixtures/ts-syntax/, one .ts and one .tsx copy of each of these:

  • reserved-word-alias: reserved words as module names in imports, local exports, re-exports and export * as. Examples: import { null as n }, export { a as delete }, export { null as x } from, export * as delete from.
  • typeof-reserved-member: a reserved word as the member after typeof in a type, as in typeof import("./mod").default, typeof ns.default, typeof ns.b.delete and typeof ns.null.

Verified:

  • Fork main's wasm: --only local gives 29 files and 24 agree-ok. tsc accepts all four new files, and the 5 known gaps are unchanged. Exit 0, no baseline change.
  • SegaraRai/tree-sitter-typescript@82b3609's wasm: all four new files diverge, so the typescript and tsx grammars are both pinned. Exit 1.

Before this, these constructs were covered only by chance, in 7 Effect/Zod files and 6 VS Code files. Round 1 of /dual-review found the first version pinned the wrong rule (typeof import() instead of a reserved member after typeof) and covered .ts only, so this version fixes both.

Reserved words as export aliases and typeof import("x").member parse on
the vendored grammar but fail on SegaraRai/tree-sitter-typescript@82b3609.
They were only covered by chance inside the Effect, Zod and VS Code corpora;
as strict fixtures, any grammar bump or fork that regresses them fails the job.
Review found the fork breaks a reserved word after typeof in a type
(typeof ns.default), not typeof import() itself, and reserved words in
import and re-export specifiers too. Rename and widen the fixtures, and
add tsx twins so the tsx grammar is pinned as well.
@inth3shadows
inth3shadows merged commit bb0ea5b into main Nov 6, 2026
1 check passed
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.

1 participant