Skip to Content
0 likes
Python Type Hints: Catch Bugs Before Your Users Do Level: Advanced

Python ignores type hints when it runs. A checker like mypy doesn't. See one file crash on its first bug, then see mypy find both bugs before anything runs, and learn where to start adding hints in an existing project.

0 likes
Adding mypy to an Existing Python Project Without 500 Errors on Day One Level: Advanced

Start mypy with its defaults, fix what it finds, turn on check_untyped_defs, then make one module at a time strict. Every function you annotate checks every place that calls it, so start with the busiest ones.

0 likes
Type-Check Plain JavaScript With JSDoc and @ts-check Level: Advanced

Add // @ts-check to the top of a file and JSDoc types to your functions, and the TypeScript checker flags wrong arguments in your editor and in CI. No build step, no .ts files.

0 likes
Add typescript-eslint to an Existing TS Repo Level: Advanced

Install typescript-eslint on TypeScript 7, switch the rules on as warnings, count them by rule and hold the count down. After this, you can adopt type-aware linting without blocking the team for a week.

0 likes
Augment Express Request Without Fighting the Compiler Level: Advanced

Add a user property to the Express request type with a module augmentation in one declaration file. After this, middleware and handlers agree on the type and you avoid the mistake that floods node_modules with errors.

0 likes
Brand a userId So It Won't Accept an orderId Level: Advanced

Add a brand to two string ids and a parse function that creates them. After this, passing an orderId where a userId is expected is an error in the editor.

0 likes
Conditional Types That Extract a Promise's Value Level: Advanced

Write a conditional type with infer that takes the value out of a promise and see how it differs from Awaited. After this, you can read the value type of an async function without writing it by hand.

0 likes
const Assertions for a Fixed Lookup Table Level: Advanced

Freeze a lookup table with as const and derive its keys and values as types. After this, the table and the type that describes it can never drift apart.

0 likes
Migrate One Module While Testing Its JavaScript Boundary Level: Advanced

Convert one JavaScript module, catch a lost runtime guard, and verify an unchanged JavaScript caller against the emitted TypeScript build.

0 likes
Diagnose a Stale TypeScript Project-Reference Build Level: Advanced

Reproduce a project-only build that consumes stale shared declarations, rebuild the graph, and verify that an API change reaches its consumer.

0 likes
satisfies on a Config Object Without Widening Level: Advanced

Check a config object against a type with satisfies and keep its precise keys and literal values. After this, a typo in a key is caught and the object still autocompletes.

0 likes
Speed Up tsc With incremental and Smarter Includes Level: Advanced

Count the files tsc reads, narrow the include list and turn on incremental with a cache file. After this, you know which change made the build faster because you measured it.