The function myFun
is defined in the included file:
<include src="my-funs.js"><script>
The include file has // @ts-check
and a JSDoc comment for the function:
/**
*
* @param {*} type
* @param {*} attrib
* @param {*} inner
* @returns {*}
*/
function myFun(type, attrib, inner) {
// code
}
I am using VS Code and it tells me the error in the title.
I expected JSDoc/TypeScript to find the declaration of myFun
, but obviously I was wrong.
What am I missing?
1
/**
*
* @param {string} type
* @param {string} attrib
* @param {string} inner
* @returns {string}
*/
function myFun(type, attrib, inner) {
}
try to add types instead of * since typescript relies on type annotations
New contributor
Waleed Taher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2