Skip to Content
0 likes
Fix "Cannot find name" After Renaming a .js File Level: Beginner

Install the Node types, turn them on in tsconfig.json, and switch require to import. Also covers the other causes of the same error: a typo, a missing import and a missing lib.

0 likes
Read a TypeScript Error Message Without Guessing Level: Beginner

Read an error in three passes and match the eight most common phrases to their causes, using real tsc output. After this, a wall of errors is a list you can work through.

0 likes
Function Return Types That Catch Missing returns Level: Beginner

Let a declared return type find a branch with no return, an arrow function with braces, and an async function typed wrong. After this, a function cannot quietly give back undefined.

0 likes
tsconfig strict: Turn It On Without 200 Errors Level: Beginner

Count what each strict flag costs, turn them on one at a time, park one stubborn error with ts-expect-error, and finish with strict true. After this, an old project can move to strict in steps.

0 likes
Fix "Type is not assignable" on a Nested Object Level: Intermediate

Read a long assignability error from the bottom, then fix the usual causes: a wrong value, a wrong type and a literal widened to string. After this, a nested mismatch points to one property.

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.