@@ -5566,6 +5566,9 @@ namespace ts {
5566
5566
if (isJSDocNonNullableType(node)) {
5567
5567
return visitNode(node.type, visitExistingNodeTreeSymbols);
5568
5568
}
5569
+ if (isJSDocVariadicType(node)) {
5570
+ return createArrayTypeNode(visitNode((node as JSDocVariadicType).type, visitExistingNodeTreeSymbols));
5571
+ }
5569
5572
if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") {
5570
5573
return setOriginalNode(createKeywordTypeNode(SyntaxKind.AnyKeyword), node);
5571
5574
}
@@ -5592,8 +5595,8 @@ namespace ts {
5592
5595
mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, undefined) : createParameter(
5593
5596
/*decorators*/ undefined,
5594
5597
/*modifiers*/ undefined,
5595
- p.dotDotDotToken ,
5596
- p.name || p.dotDotDotToken ? `args` : `arg${i}`,
5598
+ getEffectiveDotDotDotForParameter(p) ,
5599
+ p.name || getEffectiveDotDotDotForParameter(p) ? `args` : `arg${i}`,
5597
5600
p.questionToken,
5598
5601
visitNode(p.type, visitExistingNodeTreeSymbols),
5599
5602
/*initializer*/ undefined
@@ -5607,8 +5610,8 @@ namespace ts {
5607
5610
map(node.parameters, (p, i) => createParameter(
5608
5611
/*decorators*/ undefined,
5609
5612
/*modifiers*/ undefined,
5610
- p.dotDotDotToken ,
5611
- p.name || p.dotDotDotToken ? `args` : `arg${i}`,
5613
+ getEffectiveDotDotDotForParameter(p) ,
5614
+ p.name || getEffectiveDotDotDotForParameter(p) ? `args` : `arg${i}`,
5612
5615
p.questionToken,
5613
5616
visitNode(p.type, visitExistingNodeTreeSymbols),
5614
5617
/*initializer*/ undefined
@@ -5652,6 +5655,10 @@ namespace ts {
5652
5655
5653
5656
return visitEachChild(node, visitExistingNodeTreeSymbols, nullTransformationContext);
5654
5657
5658
+ function getEffectiveDotDotDotForParameter(p: ParameterDeclaration) {
5659
+ return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? createToken(SyntaxKind.DotDotDotToken) : undefined);
5660
+ }
5661
+
5655
5662
function rewriteModuleSpecifier(parent: ImportTypeNode, lit: StringLiteral) {
5656
5663
if (bundled) {
5657
5664
if (context.tracker && context.tracker.moduleResolverHost) {
0 commit comments