TypeScript error codes, explained
One page per error: what the compiler actually means, a reproduction you can paste, and the realistic fixes — including when a fix is the wrong call.
Same complaint as TS2571, phrased for a named variable — most often a catch-clause error.
The value can be null, and you used it without checking first.
Same as TS2531, but for undefined.
TypeScript has never heard of this identifier.
TypeScript can't resolve an import — the package, the path, or the types are missing.
You're putting a value somewhere its type doesn't fit.
You're reading a property TypeScript doesn't believe is there.
You're passing the wrong type into a function.
You put () after something that is not a function.
You compared two values that can never be equal, so the comparison is always false.
The same let/const name is declared twice in one scope — often across files you didn't expect to share one.
TypeScript can see a path through your code where the variable is still empty when you read it.
You're using a value that TypeScript knows can be null.
You're accessing something on a value that may be undefined at that point.
You indexed an object with something that is not a string, number or symbol.
The property is marked readonly, so it can only be set when the object is created.
TS2339 with a spelling suggestion — you probably have a typo.
The call site and the function signature disagree about how many arguments there are.
A class field has a type but nothing ever guarantees it gets a value.
You're using a value typed unknown without proving what it is first.
The error you were suppressing is gone — the directive now has nothing to suppress, and that's the feature working.
You're reassigning a const.
An object literal doesn't have all the properties the target type requires.
The object you supplied lacks one required property of the target type.
The function has several accepted signatures and your arguments fit none of them.
You tried to delete a required property. Deleting it would leave the object not matching its own type.
The module exists, but TypeScript is looking for it the wrong way — this is a tsconfig problem, not a missing package.
You declared something and never used it. This is a lint-style hint, not a type error.
The type-level twin of TS6133 — an interface, type alias or enum that nothing references.
A function parameter has no type annotation and TypeScript can't infer one.
The package exists and runs, but ships no types — so under noImplicitAny the import is an error.
You're indexing an object with a dynamic string key it doesn't declare.
Looking for a code that is not here? The error decoder covers more codes in brief.