BeyondCodeBootcamp / BeyondCodeBootcamp/js-with-types-jsdoc-tsc-starter
Bug in tsc: can't use `@function ...` (must use `@callback ...`)
- Dominant language
- JavaScript
- Stars
- 19
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
See https://github.com/microsoft/TypeScript/issues/50274
## ❌ Invalid for `tsc`: `@typedef {Function}`
```js
/**
* @typedef {Function} PersonGreet
* @param {String} name - other's name
* @returns {String} - the greeting
*/
```
```js
/**
* @function PersonGreet
* @param {String} name - other's name
* @returns {String} - the greeting
*/
```
## ⚠️ Workaround: `@callback`
It's confusing, but it's our option.
```js
/**
* @callback PersonGreet
* @param {String} name - other's name
* @returns {String} - the greeting
*/
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.