Repository navigation
fix(core): map TS parameter properties and bodyless class methods - #143
Merged
Merged
Conversation
The source-mapping walker threw "Unhandled AST node type in mapping walker" on TSParameterProperty (`private readonly x: T`) and TSDeclareMethod (overload signatures, abstract and optional methods), so tsrx-tsc fell back to raw text and reported bogus syntax errors. Also print `override` on parameter properties, which esrap drops. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 89d4759. Configure here.
trueadm
marked this pull request as ready for review
September 23, 2026 08:51
domgan-oai
pushed a commit
to octanejs/octane
that referenced
this pull request
Sep 23, 2026
…ss methods (#1276) tsrx-tsc threw "Unhandled AST node type in mapping walker" on constructor parameter properties (TSParameterProperty) and bodyless class methods (TSDeclareMethod: overloads, abstract, optional), fell back to raw text, and reported bogus TS1144/TS1005/TS1128. The printer also dropped `override` on parameter properties. Carry the upstream fix (tsrx-org/tsrx#143) as a pnpm patch until a release ships it. Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
trueadm
enabled auto-merge (squash)
September 23, 2026 14:58
trueadm
disabled auto-merge
September 23, 2026 14:58
Merged
This was referenced Sep 23, 2026
4 of 6 tasks
trueadm
pushed a commit
to octanejs/octane
that referenced
this pull request
Sep 24, 2026
* fix: update the TSRX toolchain to @tsrx/core 0.3.2 Update the shared TSRX packages to the release in tsrx-org/tsrx#218 and drop the @tsrx/[email protected] patch, which core 0.3.0 ships (tsrx-org/tsrx#143). Core now gives each @switch arm its own block scope, so arms may declare the same local and an arm's `apply` resolves to its own style block. Core lowers a @for whose body awaits to `__map_iterable_async` in the editor's virtual TSX: - Re-export `map_iterable_async` from `octane/tsrx-iterable` and require it in verify-dist, so the helper import resolves and the loop binding keeps its type (#1291). - Claim `__map_iterable_async` as a @for origin, so type inspection resolves the keyword instead of the whole loop (#1292). Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(drei): cast state.controls through unknown, as upstream does tsrx-tsc from @tsrx/typescript-plugin 0.4.10 now maps the TS2352 that TypeScript reports for a direct cast from `EventDispatcher<{}> | null` to `ControlsProto | undefined` or `{ enabled: boolean } | undefined`, so the drei adapted-types parity lane failed. Upstream drei casts through `unknown` at each of these sites; the port had dropped that step. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Sep 26, 2026
Closed
1 task done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
segments.jsnow handlesTSParameterPropertyandTSDeclareMethod.overrideon parameter properties.Why
.tsrxfile with a constructor parameter property (constructor(private readonly start: number) {}) or a bodyless class method (overload signature,abstract m(): T;, optionalm?(): T;) made the walker throwUnhandled AST node type in mapping walker: …. tsrx-tsc then fell back to raw text and reported bogus TS1144/TS1005/TS1128 syntax errors instead of type-checking the file.TSParameterPropertyprinter (still true in 2.3.9) writes accessibility andreadonlybut notoverride. Soconstructor(override readonly n: number)failed with TS4115 undernoImplicitOverride.Changes
segments.js:TSParameterPropertyvisits its parameter, plus the Identifier's annotation (an AssignmentPattern visits its own).TSDeclareMethodvisits typeParameters, params with annotations, and returnType. MethodDefinition has already visited the key.jsx/helpers.js: aTSParameterPropertyprinter override that writesaccessibility override readonly.tests/shared/source-mappings.js: 7 shared cases covering parameter properties,override, overloads, abstract members, optional methods, name/annotation mappings, and modifier preservation. They run under every target and fail without this change.Validation
tsgo --noEmit -p packages/tsrx/tsconfig.json: clean.vitest run packages/tsrx*/tests: 3469 passed.tsrx-tscnow type-checks the original repro, and a planted error is reported on the correct line.Follow-ups
@dec() x). That only matters with legacyexperimentalDecorators, so it's left for later.🤖 Generated with Claude Code
Note
Medium Risk
Touches the core Volar/source-map walker and TS print path used for every
.tsrxfile; scope is narrow but affects type-checking correctness for class-heavy code.Overview
Fixes editor/type-checking failures for
.tsrxfiles that use common TypeScript class syntax: constructor parameter properties and bodyless methods (overloads,abstract, optional signatures).The source-mapping walker in
segments.jsnow visitsTSParameterProperty(parameter + type annotations) andTSDeclareMethod(generics, params, return type) instead of throwing and forcingtsrx-tscto fall back to raw source with bogus parse errors.The virtual TypeScript printer in
jsx/helpers.jsadds aTSParameterPropertyoverride sooverrideis emitted with accessibility/readonly(fixes TS4115 undernoImplicitOverride).Shared source-mapping tests cover parameter properties,
overridepreservation, overloads, abstract/optional members, and name/annotation mappings.Reviewed by Cursor Bugbot for commit a51fe5b. Bugbot is set up for automated code reviews on this repo. Configure here.