No successful run was found on main (c2e75f3) during the generation of this report, so e347c5b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.
Benchmarks
13 archived benchmarks were run. If they were deleted in another branch, consider rebasing to remove them from the report. .
fix(decorators): Emit correct metadata for enum parameters
This fixes decorator metadata emission to correctly handle enum parameters
in decorated methods and constructors. Previously, SWC incorrectly emitted
`typeof Options === "undefined" ? Object : Options` for enum parameters.
Now it correctly emits:
- `Number` for numeric enums
- `String` for string enums
- `Object` for mixed enums
This matches TypeScript's behavior.
Changes:
- Updated `visit_mut_class_method` to check enum map before serializing parameter types
- Updated `visit_mut_class` to check enum map for constructor parameters
- Added test case for issue #11032
Fixes #11032
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
93d58bc
2 months ago
by github-actions[bot]
0%
Fix metadata emission for enum parameters in decorators
Fixes the metadata emission for enum parameters in decorators.