* Parse JSDoc ...T and T= only at top-level JSDoc ...T and T= should only be legal at the top level of a type, and only in JSDoc, since at least T= is ambiguous elsewhere. This PR changes parsing to make that happen. The resulting parse tree is now simpler, allowing me to get rid of some code I had to add in the checker. * Extract JSDoc type parsing into its own function * PR comments:return from parseJSDocType
25 lines
749 B
TypeScript
25 lines
749 B
TypeScript
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noEmit: true
|
|
// @strictNullChecks: true
|
|
// @noImplicitAny: true
|
|
|
|
// @Filename: prefixPostfix.js
|
|
|
|
/**
|
|
* @param {number![]} x - number[]
|
|
* @param {!number[]} y - number[]
|
|
* @param {(number[])!} z - number[]
|
|
* @param {number?[]} a - (number | null)[]
|
|
* @param {?number[]} b - number[] | null
|
|
* @param {(number[])?} c - number[] | null
|
|
* @param {...?number} e - (number | null)[]
|
|
* @param {...number?} f - number[] | null
|
|
* @param {...number!?} g - number[] | null
|
|
* @param {...number?!} h - number[] | null
|
|
* @param {...number[]} i - number[][]
|
|
* @param {...number![]?} j - number[][] | null
|
|
* @param {...number?[]!} k - (number[] | null)[]
|
|
*/
|
|
function f(x, y, z, a, b, c, e, f, g, h, i, j, k) {
|
|
}
|