-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Recently we observed a developer, who was unfamiliar with JSDoc, attempt to define a type like this:
/**
* @param {Object<Object>}
*/I thought it odd that this was not detected by the linter. I checked if this was a special case but found that there was no such check performed on special types because
/**
* @param {string<Object>}
*/is also passed. 👎
/**
* @param {string<>}
*/however is invalidated because the subtype is nonexistent. 👍
AFAIK special types apply in at least two cases:
- Array and
- Promise
would it be possible to catch any type defined outside of these?
brettz9 and ExE-Boss