TypeScript/tests/baselines/reference/callbackTagVariadicType.types
Nathan Shively-Sanders 2bb54dc11a
Fix getTypeFromJSDocVariadicType in callback tag (#43562)
* Fix getTypeFromJSDocVariadicType in @callback

Variadics have never worked there, I think.

* add test + fix lint

* remove outdated comment
2021-04-07 08:12:05 -07:00

21 lines
334 B
Plaintext

=== tests/cases/conformance/jsdoc/callbackTagVariadicType.js ===
/**
* @callback Foo
* @param {...string} args
* @returns {number}
*/
/** @type {Foo} */
export const x = () => 1
>x : Foo
>() => 1 : () => number
>1 : 1
var res = x('a', 'b')
>res : number
>x('a', 'b') : number
>x : Foo
>'a' : "a"
>'b' : "b"