mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(codegen): print type parameters for MethodDefinition (#3922)
close: #3918
This commit is contained in:
parent
27f0531aac
commit
27665945f1
3 changed files with 9 additions and 1 deletions
|
|
@ -2410,6 +2410,9 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for MethodDefinition<'a> {
|
|||
if self.computed {
|
||||
p.print(b']');
|
||||
}
|
||||
if let Some(type_parameters) = self.value.type_parameters.as_ref() {
|
||||
type_parameters.gen(p, ctx);
|
||||
}
|
||||
p.print(b'(');
|
||||
self.value.params.gen(p, ctx);
|
||||
p.print(b')');
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ export class Foo {
|
|||
|
||||
export class Bar {
|
||||
public constructor(a: number = 0) {}
|
||||
}
|
||||
}
|
||||
|
||||
export class Zoo { foo<F>(f: F): F { return f } }
|
||||
|
|
@ -10,3 +10,6 @@ export declare class Foo {
|
|||
export declare class Bar {
|
||||
constructor(a?: number);
|
||||
}
|
||||
export declare class Zoo {
|
||||
foo<F>(f: F): F;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue