Courses / TypeScript
9. JSDoc-driven types
Using JSDoc annotations in JS files to get type hints before converting to .ts.
JavaScript
JSDoc-driven types
Writing JSDoc comments to get TypeScript-like type hints and checks inside plain .js files.
"I want autocomplete and type errors without renaming everything to .ts."
JSDoc-driven types are inline comments that describe types for variables, functions, and objects so editors and TypeScript's language service can provide type checking and autocompletion in .js files without converting them to .ts.
"I want autocomplete and type errors without renaming everything to .ts."
JSDoc-driven types are inline comments that describe types for variables, functions, and objects so editors and TypeScript's language service can provide type checking and autocompletion in .js files without converting them to .ts.