TypeScript Errors Reference

Every TypeScript error code explained with real examples and fixes. Search by error code or message to find exactly what you need.

19 of 19 errors

TS1005

Fix TS1005: Expected Token

'x' expected

Syntax ErrorSyntaxParsingPunctuation
TS2304

Fix TS2304: Cannot Find Name 'X'

Cannot find name 'X'

Semantic ErrorImportsDeclarationsScope
TS2322

Fix TS2322: Type Not Assignable

Type 'X' is not assignable to type 'Y'

Semantic ErrorType SafetyAssignmentType Checking
TS2339

Fix TS2339: Property Does Not Exist on Type

Property 'X' does not exist on type 'Y'

Semantic ErrorProperty AccessType SafetyObjects
TS2345

Fix TS2345: Argument Type Not Assignable to Parameter

Argument of type 'X' is not assignable to parameter of type 'Y'

Semantic ErrorFunction ArgumentsType SafetyParameters
TS2352

Fix TS2352: Type Conversion May Be a Mistake

Conversion of type 'X' to type 'Y' may be a mistake

Semantic ErrorType AssertionsType CastingType Safety
TS2531

Fix TS2531: Object Is Possibly 'null'

Object is possibly 'null'

Strict ModeNull SafetyStrict ModeNull Checks
TS2532

Fix TS2532: Object Is Possibly 'undefined'

Object is possibly 'undefined'

Strict ModeNull SafetyStrict ModeOptional Chaining
TS2551

Fix TS2551: Property Does Not Exist - Did You Mean?

Property 'X' does not exist on type 'Y'. Did you mean 'Z'?

Semantic ErrorTyposProperty AccessSuggestions
TS2554

Fix TS2554: Wrong Number of Arguments

Expected N arguments, but got M

Semantic ErrorFunction ArgumentsArityParameters
TS2556

Fix TS2556: Spread Argument Must Have Tuple Type

A spread argument must either have a tuple type or be passed to a rest parameter

Semantic ErrorSpread OperatorTuplesRest Parameters
TS2564

Fix TS2564: Property Has No Initializer

Property 'x' has no initializer and is not definitely assigned in the constructor

Strict ModeStrict ModeClass PropertiesInitialization
TS2571

Fix TS2571: Object Is of Type 'unknown'

Object is of type 'unknown'

Semantic ErrorUnknown TypeType SafetyType Guards
TS2683

Fix TS2683: 'this' Implicitly Has Type 'any'

'this' implicitly has type 'any' because it does not have a type annotation

Strict Modethis ContextStrict ModenoImplicitThis
TS2740

Fix TS2740: Type 'X' Is Missing Properties from Type 'Y'

Type 'X' is missing the following properties from type 'Y'

Semantic ErrorObject TypesMissing PropertiesInterfaces
TS2769

Fix TS2769: No Overload Matches This Call

No overload matches this call

Semantic ErrorOverloadsFunction CallsType Safety
TS7006

Fix TS7006: Parameter Implicitly Has 'any' Type

Parameter 'x' implicitly has an 'any' type

Strict ModeStrict ModeType AnnotationsnoImplicitAny
TS7022

Fix TS7022: Implicitly Has Type 'any'

'x' implicitly has type 'any' because it does not have a type annotation and is referenced directly ...

Strict ModeCircular ReferencesType InferencenoImplicitAny
TS18046

Fix TS18046: 'x' Is of Type 'unknown'

'x' is of type 'unknown'

Semantic ErrorUnknown TypeType GuardsError Handling