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