> For the complete documentation index, see [llms.txt](https://notes.lirenxn.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.lirenxn.com/2019-1/wk-notes-11-20-jsdoc.md).

# Wk-notes-11-20-JSDoc

### **JSDoc and Typescript**

It can give javascript type check in vscode with `// @ts-check`, being a good way to gradually introduce typescript, or to at least benefits your own when refactoring.

#### **Supported JSDoc:**

* `@type`
* `@param` (or `@arg` or `@argument`)
* `@returns` (or `@return`)
* `@typedef`
* `@callback`
* `@template`
* `@class` (or `@constructor`)
* `@this`
* `@extends` (or `@augments`)
* `@enum`

  **Ref :** <https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc>

  **Ref :** <https://medium.com/@martin_hotell/build-100-type-safe-react-apps-in-vanilla-javascript-bd29a8364078>
