// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: a.js
/** @param {...string|Array} rest */
function f(...rest) {
rest
}
Expected behavior:
Rest is of type (string | any[])[]
Actual behavior:
Rest is of type (string[] | any[])
Only one ... is allowed, at the beginning of a parameter, so a lot of authors reasonably assume that it has very low precedence.
Expected behavior:
Rest is of type (string | any[])[]
Actual behavior:
Rest is of type (string[] | any[])
Only one
...is allowed, at the beginning of a parameter, so a lot of authors reasonably assume that it has very low precedence.