711b4e778b
* Indirect calls for imported functions * Fix unit tests
37 lines
676 B
TypeScript
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;
|