TypeScript/tests/baselines/reference/jsdocVariadicType.types
Jean Pierre 40ec8392a1
Fixes JSDoc @type function with variable args is interpreted incorrectly (#44864)
* Fixes #44386

* Add test

* Move test from fourslash to conformance
2021-07-13 17:17:24 -07:00

19 lines
496 B
Plaintext

=== tests/cases/conformance/jsdoc/a.js ===
/**
* @type {function(boolean, string, ...*):void}
*/
const foo = function (a, b, ...r) { };
>foo : (arg0: boolean, arg1: string, ...arg2: any[]) => void
>function (a, b, ...r) { } : (a: boolean, b: string, ...r: any[]) => void
>a : boolean
>b : string
>r : any[]
=== tests/cases/conformance/jsdoc/b.ts ===
foo(false, '');
>foo(false, '') : void
>foo : (arg0: boolean, arg1: string, ...arg2: any[]) => void
>false : false
>'' : ""