Fix jsdoc variadic type nodes not being remapped to equivalent TS in output by weswigham · Pull Request #38276 · microsoft/TypeScript · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, ...args) {
>apply : (func: Function, thisArg: any, ...args: ...*) => any
>apply : (func: Function, thisArg: any, ...args: any[]) => any
>func : Function
>thisArg : any
>args : any[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// from bcryptjs
/** @param {function(...[*])} callback */
function g(callback) {
>g : (callback: (arg0: ...[*]) => ) => void
>g : (callback: (...args: [any][]) => ) => void
>callback : (...arg0: [any][]) => any

callback([1], [2], [3])
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/jsdocParseStarEquals.types
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @param {...*=} args
@return {*=} */
function f(...args) {
>f : (...args: ...*=) => any | undefined
>f : (...args: (any | undefined)[]) => any | undefined
>args : any[]

return null
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/jsdocPrefixPostfixParsing.types
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @param {...number?[]!} k - (number[] | null)[]
*/
function f(x, y, z, a, b, c, e, f, g, h, i, j, k) {
>f : (x: number[], y: number[], z: (number[]), a: (number | null)[], b: number[] | null, c: (number[]) | null, e: ...?number, f: ...?number, g: ...?!number, h: ...!?number, i: ...number[], j: ...?!number[], k: ...!?number[]) => void
>f : (x: number[], y: number[], z: (number[]), a: (number | null)[], b: number[] | null, c: (number[]) | null, e: (number | null)[], f: (number | null)[], g: (number | null)[], h: (number | null)[], i: number[][], j: (number[] | null)[], k: (number | null)[][]) => void
>x : number[]
>y : number[]
>z : number[]
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/jsdocRestParameter_es6.types