You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is the right syntax for declaring a function in JSDoc but if it is, it's not working.
TypeScript Version: 2.9
Search Terms: @typedef function Salsa Code
/** * @typedef {Function} SortCallback * @param {number} a * @param {number} b * @returns {number} *//** @type {SortCallback} */varfn=function(a,b){return1};[1,2,3,5].sort(fn);
Expected behavior:
No Error
Actual behavior:
index.js(11,17): error TS2345: Argument of type 'Function' is not assignable to parameter of type '((a: number, b: number) => number) | undefined'.
Type 'Function' is not assignable to type '(a: number, b: number) => number'.
Type 'Function' provides no match for the signature '(a: number, b: number): number'.
error An unexpected error occurred: "Command failed.
Exit code: 2
Command: sh
Arguments: -c /Users/mazimi/Projects/ts-bug/node_modules/.bin/tsc
Directory: /Users/mazimi/Projects/ts-bug
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/mazimi/Projects/ts-bug/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The text was updated successfully, but these errors were encountered:
Not sure if this is the right syntax for declaring a function in JSDoc but if it is, it's not working.
TypeScript Version: 2.9
Search Terms:
@typedef
function SalsaCode
Expected behavior:
No Error
Actual behavior:
The text was updated successfully, but these errors were encountered: