Errors
TypeScript errors
TSxxxx compiler errors.
1,407 entries0 written pages
Showing 1 to 50 of 1,407Source: TypeScript diagnosticMessages.json
| Code | Error | Category | Page |
|---|---|---|---|
| TS1002 | Unterminated string literal. | Error | Reference |
| TS1003 | Identifier expected. | Error | Reference |
| TS1005 | '{0}' expected. | Error | Reference |
| TS1006 | A file cannot have a reference to itself. | Error | Reference |
| TS1007 | The parser expected to find a '{1}' to match the '{0}' token here. | Error | Reference |
| TS1009 | Trailing comma not allowed. | Error | Reference |
| TS1010 | '*/' expected. | Error | Reference |
| TS1011 | An element access expression should take an argument. | Error | Reference |
| TS1012 | Unexpected token. | Error | Reference |
| TS1013 | A rest parameter or binding pattern may not have a trailing comma. | Error | Reference |
| TS1014 | A rest parameter must be last in a parameter list. | Error | Reference |
| TS1015 | Parameter cannot have question mark and initializer. | Error | Reference |
| TS1016 | A required parameter cannot follow an optional parameter. | Error | Reference |
| TS1017 | An index signature cannot have a rest parameter. | Error | Reference |
| TS1018 | An index signature parameter cannot have an accessibility modifier. | Error | Reference |
| TS1019 | An index signature parameter cannot have a question mark. | Error | Reference |
| TS1020 | An index signature parameter cannot have an initializer. | Error | Reference |
| TS1021 | An index signature must have a type annotation. | Error | Reference |
| TS1022 | An index signature parameter must have a type annotation. | Error | Reference |
| TS1024 | 'readonly' modifier can only appear on a property declaration or index signature. | Error | Reference |
| TS1025 | An index signature cannot have a trailing comma. | Error | Reference |
| TS1028 | Accessibility modifier already seen. | Error | Reference |
| TS1029 | '{0}' modifier must precede '{1}' modifier. | Error | Reference |
| TS1030 | '{0}' modifier already seen. | Error | Reference |
| TS1031 | '{0}' modifier cannot appear on class elements of this kind. | Error | Reference |
| TS1034 | 'super' must be followed by an argument list or member access. | Error | Reference |
| TS1035 | Only ambient modules can use quoted names. | Error | Reference |
| TS1036 | Statements are not allowed in ambient contexts. | Error | Reference |
| TS1038 | A 'declare' modifier cannot be used in an already ambient context. | Error | Reference |
| TS1039 | Initializers are not allowed in ambient contexts. | Error | Reference |
| TS1040 | '{0}' modifier cannot be used in an ambient context. | Error | Reference |
| TS1042 | '{0}' modifier cannot be used here. | Error | Reference |
| TS1044 | '{0}' modifier cannot appear on a module or namespace element. | Error | Reference |
| TS1046 | Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. | Error | Reference |
| TS1047 | A rest parameter cannot be optional. | Error | Reference |
| TS1048 | A rest parameter cannot have an initializer. | Error | Reference |
| TS1049 | A 'set' accessor must have exactly one parameter. | Error | Reference |
| TS1051 | A 'set' accessor cannot have an optional parameter. | Error | Reference |
| TS1052 | A 'set' accessor parameter cannot have an initializer. | Error | Reference |
| TS1053 | A 'set' accessor cannot have rest parameter. | Error | Reference |
| TS1054 | A 'get' accessor cannot have parameters. | Error | Reference |
| TS1055 | Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value. | Error | Reference |
| TS1056 | Accessors are only available when targeting ECMAScript 5 and higher. | Error | Reference |
| TS1058 | The return type of an async function must either be a valid promise or must not contain a callable 'then' member. | Error | Reference |
| TS1059 | A promise must have a 'then' method. | Error | Reference |
| TS1060 | The first parameter of the 'then' method of a promise must be a callback. | Error | Reference |
| TS1061 | Enum member must have initializer. | Error | Reference |
| TS1062 | Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method. | Error | Reference |
| TS1063 | An export assignment cannot be used in a namespace. | Error | Reference |
| TS1064 | The return type of an async function or method must be the global Promise<T> type. Did you mean to write 'Promise<{0}>'? | Error | Reference |
Other families: JavaScript, Node.js, npm, React, Next.js, Vite, webpack, Jest