~/talk

JSDocs: It's like TypeScript but without all that TypeScript

Talkat Conf42 JavaScript 2022 · on Thursday, 2022-11-17· [typescript, developer-experience]
slides:none on file

Uses JSDoc plus the TypeScript language service to add real type checking without converting codebases to .ts; VS Code provides intellisense, and CI runs the tsc compiler as an npm devDependency. Steps: enable @ts-check per file, flip checkJs in tsconfig.json for project-wide checks, add a CI step that runs tsc with noEmit to fail builds, and set declaration + emitDeclarationOnly to produce .d.ts files into dist for libraries. This incremental workflow runs and produces usable type definitions.

AI-written summary · about

  1. 0:00Introduction
  2. 7:44Why combine JavaScript and TypeScript
  3. 10:37JSDoc in VS Code
  4. 13:28Custom types with JSDoc
  5. 15:16Type checking project
  6. 17:47Type checking in CI/CD
  7. 18:52Generate type definitions
  8. 19:59Incremental adoption
  9. 22:24Closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.