A small PoC on JSDOC typing
Enable JSDOC typing just by adding a jsconfig.json
with this simple configuration, in the root directory of the project
{
"compilerOptions": {
"checkJs": true
},
"exclude": ["node_modules", "**/node_modules/*"]
}
- Evaluated simple types and functions in
multiplyByTwo
example. - Evaluated object types, unions and intersections in
enhcanceCat
example.
AND LOVED IT.
Using eslint-plugin-jsdoc
for linting, more details here