diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index 5ce2a2b1b9a..ab926c0a9e2 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -1231,6 +1231,7 @@ where } } emit!(node.super_class); + emit!(node.super_type_params); } formatting_space!(); diff --git a/crates/swc_ecma_codegen/tests/fixture/issues/5328/input.ts b/crates/swc_ecma_codegen/tests/fixture/issues/5328/input.ts new file mode 100644 index 00000000000..5d6e4f7cf80 --- /dev/null +++ b/crates/swc_ecma_codegen/tests/fixture/issues/5328/input.ts @@ -0,0 +1,3 @@ +class Page extends React.Component { + render() {} +} diff --git a/crates/swc_ecma_codegen/tests/fixture/issues/5328/output.ts b/crates/swc_ecma_codegen/tests/fixture/issues/5328/output.ts new file mode 100644 index 00000000000..5d6e4f7cf80 --- /dev/null +++ b/crates/swc_ecma_codegen/tests/fixture/issues/5328/output.ts @@ -0,0 +1,3 @@ +class Page extends React.Component { + render() {} +} diff --git a/crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_extends/output.ts b/crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_extends/output.ts index 372347f774d..7337e1782cc 100644 --- a/crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_extends/output.ts +++ b/crates/swc_ecma_transforms_base/tests/ts-resolver/ts_resolver_import_and_extends/output.ts @@ -1,5 +1,6 @@ import { Nullable__1 } from "nullable"; import { Component__1 } from "react"; -class Foo__1 extends Component__1 { +class Foo__1 extends Component__1 { } new Foo__1();