Errors
TypeScript errors
TSxxxx compiler errors.
1,407 entries0 written pages
Showing 201 to 250 of 1,407Source: TypeScript diagnosticMessages.json
| Code | Error | Category | Page |
|---|---|---|---|
| TS1250 | Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. | Error | Reference |
| TS1251 | Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode. | Error | Reference |
| TS1252 | Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode. | Error | Reference |
| TS1253 | Abstract properties can only appear within an abstract class. | Error | Reference |
| TS1254 | A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference. | Error | Reference |
| TS1255 | A definite assignment assertion '!' is not permitted in this context. | Error | Reference |
| TS1257 | A required element cannot follow an optional element. | Error | Reference |
| TS1258 | A default export must be at the top level of a file or module declaration. | Error | Reference |
| TS1259 | Module '{0}' can only be default-imported using the '{1}' flag | Error | Reference |
| TS1260 | Keywords cannot contain escape characters. | Error | Reference |
| TS1261 | Already included file name '{0}' differs from file name '{1}' only in casing. | Error | Reference |
| TS1262 | Identifier expected. '{0}' is a reserved word at the top-level of a module. | Error | Reference |
| TS1263 | Declarations with initializers cannot also have definite assignment assertions. | Error | Reference |
| TS1264 | Declarations with definite assignment assertions must also have type annotations. | Error | Reference |
| TS1265 | A rest element cannot follow another rest element. | Error | Reference |
| TS1266 | An optional element cannot follow a rest element. | Error | Reference |
| TS1267 | Property '{0}' cannot have an initializer because it is marked abstract. | Error | Reference |
| TS1268 | An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. | Error | Reference |
| TS1269 | Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled. | Error | Reference |
| TS1270 | Decorator function return type '{0}' is not assignable to type '{1}'. | Error | Reference |
| TS1271 | Decorator function return type is '{0}' but is expected to be 'void' or 'any'. | Error | Reference |
| TS1272 | A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and... | Error | Reference |
| TS1273 | '{0}' modifier cannot appear on a type parameter | Error | Reference |
| TS1274 | '{0}' modifier can only appear on a type parameter of a class, interface or type alias | Error | Reference |
| TS1275 | 'accessor' modifier can only appear on a property declaration. | Error | Reference |
| TS1276 | An 'accessor' property cannot be declared optional. | Error | Reference |
| TS1277 | '{0}' modifier can only appear on a type parameter of a function, method or class | Error | Reference |
| TS1278 | The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}. | Error | Reference |
| TS1279 | The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}. | Error | Reference |
| TS1280 | Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set... | Error | Reference |
| TS1281 | Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead. | Error | Reference |
| TS1282 | An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type. | Error | Reference |
| TS1283 | An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration. | Error | Reference |
| TS1284 | An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type. | Error | Reference |
| TS1285 | An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration. | Error | Reference |
| TS1286 | ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. | Error | Reference |
| TS1287 | A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled. | Error | Reference |
| TS1288 | An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled. | Error | Reference |
| TS1289 | '{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider... | Error | Reference |
| TS1290 | '{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider... | Error | Reference |
| TS1291 | '{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type'... | Error | Reference |
| TS1292 | '{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type... | Error | Reference |
| TS1293 | ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'. | Error | Reference |
| TS1294 | This syntax is not allowed when 'erasableSyntaxOnly' is enabled. | Error | Reference |
| TS1295 | ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest... | Error | Reference |
| TS1300 | 'with' statements are not allowed in an async function block. | Error | Reference |
| TS1308 | 'await' expressions are only allowed within async functions and at the top levels of modules. | Error | Reference |
| TS1309 | The current file is a CommonJS module and cannot use 'await' at the top level. | Error | Reference |
| TS1312 | Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern. | Error | Reference |
| TS1313 | The body of an 'if' statement cannot be the empty statement. | Error | Reference |
Other families: JavaScript, Node.js, npm, React, Next.js, Vite, webpack, Jest