JSDoc · TypeScript · jsconfig.json

Type-checked JavaScript. No build step.

Write your types as JSDoc comments and let TypeScript's checker read them through one jsconfig.json file. Your .js files run exactly as written, and your editor and CI catch type errors before your users do.

Set up checking in three steps

TypeScript 5.9.3 TypeScript 5.9.3, run 21 October 2026: No errors. 6.0.3 TypeScript 6.0.3, run 21 October 2026: the same as 5.9.3. No errors. 7.0.2 TypeScript 7.0.2, run 21 October 2026: the same as 5.9.3. No errors. checked 21 October 2026
  1. Start a project

    Terminal
    npm init -y
    npm pkg set type=module
    npm install --save-dev typescript
  2. Create jsconfig.json

    jsconfig.json
    {
      "compilerOptions": {
        "checkJs": true,
        "noEmit": true,
        "strict": true,
        "module": "nodenext",
        "target": "es2022"
      }
    }
  3. Check your code

    Terminal
    npm pkg set scripts.lint="tsc -p jsconfig.json"
    npm run lint

    This config checks index.js in the quick start on every build of this site.

  • 0 build steps
  • 1 config file
  • 5 minutes
The full quick start

Why bother

What you get

The checking TypeScript users rely on, in the JavaScript you already write.

  • Editor hints

    Completions, hovers and inline errors in every .js file, from comments you would write anyway.

  • Errors before runtime

    Typos, wrong arguments and missing null checks fail in your editor and in CI, not in production.

  • Docs from the same comments

    The JSDoc that types a function also documents it, for the checker, the editor and the next reader.

  • Publishable types

    TypeScript can turn the same comments into .d.ts files, so people who install your package get types too.

The reference

Look it up

Tag and type pages pair the JSDoc with its TypeScript spelling, and every example in the reference passed (or failed exactly as shown) in tsc.

  • JSDoc tags

    Every JSDoc tag as TypeScript reads it: syntax, support level, checked examples.

  • Type expressions

    What goes inside the braces: unions, generics, object shapes, each next to its TypeScript spelling.

  • Config options

    The jsconfig.json options that matter for JavaScript, and what each one changes.

  • Errors

    The errors JavaScript projects meet first, what causes each one, and how to fix it.

  • Editors

    Making your editor show the same errors as tsc, one editor at a time.

  • TypeScript releases

    What each TypeScript release from 4.0 to 7.0 changed for JavaScript checked with JSDoc.

Recipes

How do I type this?

Answers to specific questions about real code, each one checked end to end. Six places to start, and 58 recipes in all.

All 58 recipes, by topic

Guides

Read further

The longer reads: migrating a codebase, the quirks of JSDoc, shipping types, CI. Dated, so you know how current they are.

  • 21 October 2026 · Style

    A JSDoc style guide for type-checked JavaScript

    House rules for JSDoc that TypeScript checks: one comment style, where @typedefs live, naming, @import, @satisfies over casts, and Prettier settings.

  • 21 October 2026 · Adoption

    Checking JavaScript in CI

    Run tsc on every pull request: a GitHub Actions workflow, caching, monorepos, a pre-commit hook, and failing only on new errors with a baseline file.

  • 21 October 2026 · Adoption

    Choosing a strictness level for checked JavaScript

    Relaxed, recommended or strict: what each level of jsconfig.json strictness catches, what it costs in an existing codebase, and an order to turn options on.

  • 21 October 2026 · Concepts

    How TypeScript reads a JavaScript file

    How tsc reads a .js file: types from initializers, this and module.exports assignments, which JSDoc comments count, and what .js allows that .ts does not.

  • 21 October 2026 · Adoption

    Migrating a JavaScript codebase to checked JavaScript, step by step

    Move an existing JavaScript project to type-checked JavaScript one step at a time: per file, per folder, then noImplicitAny and strict, measuring as you go.

All 10 guides

Compare

Weigh it up

Checked JavaScript next to the alternatives: TypeScript files, Node's type stripping, Flow, other runtimes and TypeScript's own versions.

All comparisons

Where the name comes from

A talk, a tool, and now a reference

The name comes from a 2022 conference talk by AJ ONeal that made the case for typed JavaScript without transpiling, and from the setup tool he published with it. This site is an independent reference for the same idea.

The history

Check your first file today

One config file and one npm script. Your code runs exactly as it does now; it just gets checked first.

Start in 5 minutes

Type-checked JavaScript. No build step.