Skip to content

Commit 012a16f

Browse files
committed
Fix name-annotated rest annotations
1 parent 70cc7d0 commit 012a16f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/html_helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function formatType(type, paths) {
9090
case 'AllLiteral':
9191
return 'Any';
9292
case 'RestType':
93-
return '...' + formatType(type.expression);
93+
return '...' + formatType(type.expression, paths);
9494
case 'OptionalType':
9595
return '<code>[' + formatType(type.expression, paths) + ']</code>';
9696
case 'TypeApplication':

test/fixture/html/nested.input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function bar() {
9292
* Rest property function
9393
* @returns {undefined} nothing
9494
*/
95-
function bar(...toys) {
95+
function bar(...toys: Number) {
9696
return undefined;
9797
}
9898

test/fixture/html/nested.output.files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ like a <a href="Klass"><code>klass</code></a></p>
17081708

17091709
<h4>Parameters</h4>
17101710
<ul class='suppress-p-margin'>
1711-
<li>... <strong>toys</strong>
1711+
<li>...<code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></code> <strong>toys</strong>
17121712
:
17131713
<span class='force-inline'>
17141714

0 commit comments

Comments
 (0)