Files
Donny/강동윤andGitHub c0a0c19e16 fix(es/decorators): handle import types in decorator metadata (#11916)
**Description:**

Fixes a legacy decorator metadata panic when a decorated TypeScript
member uses an inline import type such as `import("./Message").Message`.

The metadata serializer now treats `TsImportType` as an unresolvable
transpile-only type and emits `Object`, matching TypeScript's runtime
metadata behavior. The catch-all serializer path also falls back to
`Object` instead of panicking on well-formed TS type nodes, and bigint
literal metadata now follows the existing `BigInt` constructor fallback.

Added legacy metadata fixtures for import types on properties, methods,
constructors, parenthesized/generic/union/intersection forms, and bigint
literal metadata.

Validation:
- `git submodule update --init --recursive`
- `UPDATE=1 cargo test -p swc_ecma_transforms --all-features --test
decorators
legacy_metadata_tests__fixture__legacy_metadata__issues__11915 --
--include-ignored`
- `cargo test -p swc_ecma_transforms --all-features --test decorators
legacy_metadata_tests__fixture__legacy_metadata__issues__11915 --
--include-ignored`
- `cargo test -p swc_ecma_transforms --all-features --test decorators
legacy_metadata_tests -- --include-ignored`
- `cargo test -p swc_ecma_transforms_proposal`
- `cargo test -p swc_ecma_transforms`
- `cargo fmt --all`
- `cargo clippy --all --all-targets -- -D warnings`

Note: `cargo test -p swc_ecma_transforms --all-features` was also
attempted locally, but exec tests requiring `mocha` could not run
because `mocha` is not installed on PATH in this environment.

**Related issue:**

Closes #11915
2026-06-02 11:08:31 +00:00
..