TypeScript/tests/baselines/reference/callbackTagVariadicType.js
Ron Buckton 711b4e778b
Indirect calls for imported functions (#44624)
* Indirect calls for imported functions

* Fix unit tests
2021-06-21 19:51:13 -07:00

37 lines
676 B
TypeScript

//// [callbackTagVariadicType.js]
/**
* @callback Foo
* @param {...string} args
* @returns {number}
*/
/** @type {Foo} */
export const x = () => 1
var res = x('a', 'b')
//// [callbackTagVariadicType.js]
"use strict";
/**
* @callback Foo
* @param {...string} args
* @returns {number}
*/
exports.__esModule = true;
exports.x = void 0;
/** @type {Foo} */
var x = function () { return 1; };
exports.x = x;
var res = (0, exports.x)('a', 'b');
//// [callbackTagVariadicType.d.ts]
/**
* @callback Foo
* @param {...string} args
* @returns {number}
*/
/** @type {Foo} */
export const x: Foo;
export type Foo = (...args: string[]) => number;