JavaScript with Types: A deep dive into TSC & JSDoc with Vanilla JS!
summary
Shows how to add typed JavaScript using JSDoc + the TypeScript checker (TSC) with no transpilation, using commands like npx jswhat init to scaffold configs and npm run lint / npm run doc to run TSC and generate docs. Explains required /* / JSDoc blocks, @typedef/@prop vs @param, @callback workaround, primitive/tuple/map/enums, utility types like partial/required, the 17 tsconfig options, and the index.js re-export pattern so published packages expose their types.
AI-written summary · about
chapters (11)
- 0:00Introduction and philosophy
- 1:33JS with types philosophy
- 2:52JavaScript type system
- 5:04Tooling and JS Doc
- 6:47Project configuration
- 9:33Type annotation syntax
- 11:20Defining structures and functions
- 13:14Advanced type definitions
- 15:59Generics and utility types
- 19:42Importing and exporting types
- 20:55Types breakdown and Q&A
