The red squiggles start on line four, and by late afternoon the file has forty of them. Most beginners respond the same way: silence the compiler and keep moving. That buys an afternoon and costs a month, because the habits formed while escaping errors are exactly the habits that make TypeScript feel like paperwork. These are the seven mistakes that stall beginners most often, roughly in the order they appear.
Mistakes that switch the compiler off
The type checker is the only reason to pay the cost of TypeScript. Three habits quietly unplug it:
- Reaching for any to clear a red line. The keyword is contagious. A function that returns any infects every caller, and the errors you dodged reappear three files away with less context to work from.
- Typing after the feature works. Writing the whole thing in plain JavaScript and sprinkling annotations at the end reproduces the bugs instead of preventing them. Annotate as you go, even badly.
- Leaving strict mode off. Without strict and noImplicitAny the compiler agrees with nearly everything, and you never learn how types flow through your own code.
Turning strict on in a fresh project costs an hour. Turning it on in a finished one costs a weekend.
Mistakes that make types fight you
Two more mistakes turn the type system into an opponent rather than a helper:
- Copying a shape into a second interface. Two declarations of the same object drift apart the first time a field changes. Derive the second from the first with Pick, Omit, or an indexed lookup instead of retyping it.
- Reaching for generics too early. A generic is the answer to repetition you have already written three times. Written before that, it is decoration you cannot debug, and every error message gets longer.
If a type needs a comment to explain what it is for, the model is probably wrong, not the syntax.
Mistakes that cost the most weeks
- The tutorial loop. Course after course, never a file longer than twenty lines. Types only stick when the data belongs to you and the bug is yours to fix.
- Skimming error messages. The first line names the file and position; the last line usually names the real conflict. Reading to the end is faster than any editor extension.
Both feel productive. Neither leaves you with code you can explain.
Two things beginners ask about these mistakes
Is any ever acceptable?
At a boundary, sometimes. When data arrives from a JSON file, a network response, or a library with missing types, accept unknown and narrow it before use. If you genuinely need any, leave a comment saying why and what would let you replace it.
Do I have to learn the whole type system before building something?
No. Annotations, interfaces, unions, and narrowing cover most day-to-day work. Utility types and conditional types are worth learning when a real problem demands them, not before.
None of these mistakes are fatal. Each is a habit, and habits respond to one rule you can apply without thinking: when the compiler complains, make the type more honest instead of quieter. Do that for a month and the red lines stop looking like obstacles and start looking like directions.