TypeScript Compiler Errors
Diagnostic codes emitted by the TypeScript compiler (tsc). Each code is prefixed with TS followed by a number.
References
82 codes
-
TS1002Unterminated String Literal -
TS1003Identifier Expected -
TS1005Token Expected -
TS1054Constructor Accessor Not Allowed -
TS1128Declaration or Statement Expected -
TS1161Unterminated Regular Expression -
TS1192No Default Export -
TS1238Abstract Override Not Implemented -
TS1343Import Assertion Not Permitted -
TS2304Cannot Find Name -
TS2305Module Has No Exported Member -
TS2307Cannot Find Module -
TS2314Generic Type Requires Type Arguments -
TS2322Type Not Assignable -
TS2339Property Does Not Exist -
TS2341Private Property Inaccessible -
TS2345Argument Type Not Assignable -
TS2349Not Callable -
TS2351Not a Constructor -
TS2355Function Missing Return Statement -
TS2362Left Operand Not Number or Any -
TS2363Right Operand Not Number or Any -
TS2365Operator Not Applied to Types -
TS2366Function Lacks Return Statement -
TS2375Duplicate Identifier with Different Type -
TS2378Getter Must Return Value -
TS2380Getter and Setter Must Agree -
TS2395Individual Declarations Must Be All Ambient -
TS2403Subsequent Variable Declarations Must Have Same Type -
TS2416Property Not Compatible with Base Type -
TS2420Class Incorrectly Implements Interface -
TS2430Interface Cannot Extend Class -
TS2440Import Cannot Be Named -
TS2448Variable Used Before Assignment -
TS2451Cannot Redeclare Block-Scoped Variable -
TS2454Variable Used Before Being Assigned -
TS2456Type Alias Circularly References Itself -
TS2461Type Not an Array Type -
TS2488Type Not Iterable -
TS2531Object Is Possibly Null -
TS2532Object Is Possibly Undefined -
TS2533Object Is Possibly Null or Undefined -
TS2540Cannot Assign to Read-Only Property -
TS2542Index Signature Read-Only -
TS2551Property Does Not Exist, Did You Mean -
TS2554Wrong Number of Arguments -
TS2556Spread Argument Not Assignable -
TS2559Type Has No Properties in Common -
TS2564Property Not Definitely Assigned -
TS2571Object Is of Type Unknown -
TS2578Unused @ts-expect-error -
TS2580Cannot Find Global Name -
TS2590Expression Produces Union Too Complex -
TS2602JSX Factory Not Found -
TS2604JSX Element Missing Attributes -
TS2606JSX Element Not Constructor -
TS2614Module Has No Exported Member, Did You Mean -
TS2683this Implicitly Has Type any -
TS2693Type Used as Value -
TS2769No Overload Matches Call -
TS2774Condition Always True -
TS2775Condition Always False -
TS4022Top-Level await Not Permitted -
TS4023Exported Variable Has Unexported Type -
TS4055Return Type Has Unexported Name -
TS4114Override Modifier Required -
TS5023Unknown Compiler Option -
TS5025Cannot Find tsconfig -
TS5055Cannot Overwrite Input File -
TS5082Cannot Use Bundler Module Resolution Without moduleResolution -
TS6133Declared But Never Read -
TS6142Module Resolved to Non-TypeScript File -
TS6196Declared But Its Value Never Read -
TS7006Parameter Implicitly Has any Type -
TS7015Element Implicitly Has any Type (index) -
TS7016Could Not Find Declaration File for Module -
TS7017Element Implicitly Has any Type (no index signature) -
TS7019Rest Parameter Implicitly Has any Type -
TS7022Variable Implicitly Has any Type -
TS7031Binding Element Implicitly Has any Type -
TS7034Variable Implicitly Has any in Some Locations -
TS7053Element Implicitly Has any Type (expression)