You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeScript/TSX: two false-positive "syntax errors" warnings — & in a JSX string attribute, and a member named in_* relying on ASI #2599
graphify extract . --code-only on a ~1400-file repo reports:
warning: 2 file(s) had syntax errors and may be partially extracted:
SomePage.tsx (first error at line 276), types.ts (first error at line 1242) (#2551)
Both files are valid TypeScript — tsc -b on the project exits 0. I reduced them to two independent minimal cases. Each is accepted by tsc and rejected by the bundled tree-sitter grammar, so I believe both are false positives.
The ERROR node covers exactly &b=2. These parse fine:
without the ampersand — to="/p?a=1"
with the string in braces — to={"/p?a=1&b=2"}
as a plain (non-JSX) string — const s = "/p?a=1&b=2"
Query-string URLs in to= / href= attributes are common in router-heavy code, so a single link can cost the whole file's nodes.
2. Member named in_* / instanceof_* relying on ASI (typescript grammar)
interfaceI{a: number
in_workshop: number}
The ERROR node spans from number to in_workshop:. It fires only when the previous member ends without ; or ,, and the member name begins with in or instanceof followed by a non-letter:
Adding ; to the previous member avoids it, as does moving the member to first position. The keyword-boundary check for in / instanceof seems to treat _ and digits as token terminators, though both are valid identifier-continuation characters. Names like in_workshop, in_progress, in_stock are common when types mirror snake_case API or DB fields, and semicolon-less interface members are the Prettier default.
Verification
tsc --noEmit --strict on case 2 → exit 0
tsc --noEmit --jsx preserve --skipLibCheck on case 1 → exit 0
Parsing each snippet directly with tree_sitter_typescript.language_typescript() / language_tsx() (fresh Parser per snippet) yields exactly one ERROR node, so this looks like it is upstream in the grammar rather than in graphify's extractor. Filing here since graphify pins the grammar range (>=0.23,<0.25) and surfaces the warning.
Impact
The warning itself is honest about the risk, and it is what led me to find a real bug elsewhere in my repo, so thank you for emitting it. But for these two files the extraction loss is silent and unnecessary: they are well-formed TypeScript.
Fixed in v0.9.40 (graphifyy==0.9.40 on PyPI) — same fix as #2610. The &-in-JSX-attribute and in_* interface-member cases are single-line fully-recovered errors that extract completely, so they no longer trip the warning. Thanks for the precise snippets.
Activity
fix(extract): gate the #2551 partial-parse warning on plausible symbo…
chore: bump to 0.9.40
safishamsi commentedon Aug 11, 2026
Fixed in v0.9.40 (
graphifyy==0.9.40on PyPI) — same fix as #2610. The&-in-JSX-attribute andin_*interface-member cases are single-line fully-recovered errors that extract completely, so they no longer trip the warning. Thanks for the precise snippets.