mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(codegen): missing TypeParamters in TSCallSignature (#4021)
close: #4015
This commit is contained in:
parent
432d6d93c9
commit
6254a4106f
2 changed files with 4 additions and 0 deletions
|
|
@ -3073,6 +3073,9 @@ impl<'a, const MINIFY: bool> Gen<MINIFY> for TSSignature<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Self::TSCallSignatureDeclaration(signature) => {
|
Self::TSCallSignatureDeclaration(signature) => {
|
||||||
|
if let Some(type_parameters) = signature.type_parameters.as_ref() {
|
||||||
|
type_parameters.gen(p, ctx);
|
||||||
|
}
|
||||||
p.print_str(b"(");
|
p.print_str(b"(");
|
||||||
if let Some(this_param) = &signature.this_param {
|
if let Some(this_param) = &signature.this_param {
|
||||||
this_param.gen(p, ctx);
|
this_param.gen(p, ctx);
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,7 @@ fn typescript() {
|
||||||
"class A {\n\treadonly type = 'frame';\n}\n",
|
"class A {\n\treadonly type = 'frame';\n}\n",
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
test_ts("let foo: { <T>(t: T): void }", "let foo: {<T>(t: T): void};\n", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_comment_helper(source_text: &str, expected: &str) {
|
fn test_comment_helper(source_text: &str, expected: &str) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue