fix(transformer): emit Object instead of void 0 for untyped getter/setter design:type metadata#20488
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 18, 2026
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Member
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
7576797 to
68f77e1
Compare
sapphi-red
approved these changes
Mar 18, 2026
Member
Author
Merge activity
|
…r/setter `design:type` metadata (#20488) ## Summary - Fix `design:type` metadata for getter/setter decorators without type annotations emitting `void 0` instead of `Object` - Use `serialize_type_annotation` (which defaults to `Object`) instead of `serialize_return_type_of_node` (which defaults to `void 0`) for getter `design:type` - Verified output matches TypeScript's behavior Closes #20368 ## Test plan - [x] Added untyped getter/setter test cases to `getter-setter-method` fixture - [x] Verified output matches TypeScript compiler output - [x] All conformance tests pass with no regressions - [x] Clippy clean 🤖 Generated with [Claude Code](https://claude.com/claude-code)
68f77e1 to
3bbd0cd
Compare
Boshen
added a commit
that referenced
this pull request
Mar 19, 2026
### 🚀 Features - 7215d9e transformer: Support lowering `accessor` with legacy decorators (#20348) (Dunqing) ### 🐛 Bug Fixes - 3bbd0cd transformer: Emit `Object` instead of `void 0` for untyped getter/setter `design:type` metadata (#20488) (Dunqing) - 4ae3f3f ecmascript: Apply coercion-is-pure assumption to constructor side-effect detection (#20420) (Dunqing) - 11f9695 transformer: Legacy decorator on computed property key leaves variable unassigned (#20430) (bab) - efeba28 ecmascript: Add argument validation for NewExpression side-effect detection (#20395) (Dunqing) Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
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
design:typemetadata for getter/setter decorators without type annotations emittingvoid 0instead ofObjectserialize_type_annotation(which defaults toObject) instead ofserialize_return_type_of_node(which defaults tovoid 0) for getterdesign:typeCloses #20368
Test plan
getter-setter-methodfixture🤖 Generated with Claude Code