fix(es/codegen): Emit type parameters of class super expression (#5338)

This commit is contained in:
magic-akari 2022-07-29 19:52:13 +08:00 committed by GitHub
parent f8f62eada4
commit 42d8ad26ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View File

@ -1231,6 +1231,7 @@ where
} }
} }
emit!(node.super_class); emit!(node.super_class);
emit!(node.super_type_params);
} }
formatting_space!(); formatting_space!();

View File

@ -0,0 +1,3 @@
class Page extends React.Component<Props, any> {
render() {}
}

View File

@ -0,0 +1,3 @@
class Page extends React.Component<Props, any> {
render() {}
}

View File

@ -1,5 +1,6 @@
import { Nullable__1 } from "nullable"; import { Nullable__1 } from "nullable";
import { Component__1 } from "react"; import { Component__1 } from "react";
class Foo__1 extends Component__1 { class Foo__1 extends Component__1<Nullable__1, {
}> {
} }
new Foo__1(); new Foo__1();