mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
feat(codegen): print TSThisParameter for TSCallSignatureDeclaration and TSMethodSignature (#3792)
This commit is contained in:
parent
2821e0e307
commit
01da2f78c1
1 changed files with 14 additions and 0 deletions
|
|
@ -3055,6 +3055,13 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSSignature<'a> {
|
|||
}
|
||||
Self::TSCallSignatureDeclaration(signature) => {
|
||||
p.print_str(b"(");
|
||||
if let Some(this_param) = &signature.this_param {
|
||||
this_param.gen(p, ctx);
|
||||
if !signature.params.is_empty() || signature.params.rest.is_some() {
|
||||
p.print_str(b",");
|
||||
}
|
||||
p.print_soft_space();
|
||||
}
|
||||
signature.params.gen(p, ctx);
|
||||
p.print_str(b")");
|
||||
if let Some(return_type) = &signature.return_type {
|
||||
|
|
@ -3104,6 +3111,13 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSSignature<'a> {
|
|||
type_parameters.gen(p, ctx);
|
||||
}
|
||||
p.print_str(b"(");
|
||||
if let Some(this_param) = &signature.this_param {
|
||||
this_param.gen(p, ctx);
|
||||
if !signature.params.is_empty() || signature.params.rest.is_some() {
|
||||
p.print_str(b",");
|
||||
}
|
||||
p.print_soft_space();
|
||||
}
|
||||
signature.params.gen(p, ctx);
|
||||
p.print_str(b")");
|
||||
if let Some(return_type) = &signature.return_type {
|
||||
|
|
|
|||
Loading…
Reference in a new issue