TypeScript/tests/cases/conformance/jsdoc/jsdocParseStarEquals.ts
Nathan Shively-Sanders 9a65658b28
Parse *= separately in types (#39457)
* Parse *= separately in types

Previously, when the scanner produced `*=` as a single token, the type
parser ran special-case code to produce an "optional all type", which
only makes sense when the `=` really should be attached to the `*`. This
is often not the case.

The correct solution, which I missed when I first wrote this code, is to
have the scanner go back and produce a separate `=` token, which is what
this PR does.

* add test from #38551

* we ❤️ semicolons
2020-07-07 08:30:42 -07:00

20 lines
252 B
TypeScript

// @noEmit: true
// @allowJs: true
// @checkJs: true
// @strict: true
// @Filename: a.js
/** @param {...*=} args
@return {*=} */
function f(...args) {
return null
}
/** @type *= */
var x;
/** @param {function():*=} f */
function cbf(f) {
}