Skip to content
JS
Errors

TypeScript errors

TSxxxx compiler errors.

1,407 entries0 written pages
Showing 151 to 200 of 1,407Source: TypeScript diagnosticMessages.json
CodeError
TS1194Export declarations are not permitted in a namespace.
TS1195'export *' does not re-export a default.
TS1196Catch clause variable type annotation must be 'any' or 'unknown' if specified.
TS1197Catch clause variable cannot have an initializer.
TS1198An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.
TS1199Unterminated Unicode escape sequence.
TS1200Line terminator not permitted before arrow.
TS1202Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"',...
TS1203Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
TS1205Re-exporting a type when '{0}' is enabled requires using 'export type'.
TS1206Decorators are not valid here.
TS1207Decorators cannot be applied to multiple get/set accessors of the same name.
TS1209Invalid optional chain from new expression. Did you mean to call '{0}()'?
TS1210Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see...
TS1211A class declaration without the 'default' modifier must have a name.
TS1212Identifier expected. '{0}' is a reserved word in strict mode.
TS1213Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.
TS1214Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.
TS1215Invalid use of '{0}'. Modules are automatically in strict mode.
TS1216Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules.
TS1218Export assignment is not supported when '--module' flag is 'system'.
TS1221Generators are not allowed in an ambient context.
TS1222An overload signature cannot be declared as a generator.
TS1223'{0}' tag already specified.
TS1224Signature '{0}' must be a type predicate.
TS1225Cannot find parameter '{0}'.
TS1226Type predicate '{0}' is not assignable to '{1}'.
TS1227Parameter '{0}' is not in the same position as parameter '{1}'.
TS1228A type predicate is only allowed in return type position for functions and methods.
TS1229A type predicate cannot reference a rest parameter.
TS1230A type predicate cannot reference element '{0}' in a binding pattern.
TS1231An export assignment must be at the top level of a file or module declaration.
TS1232An import declaration can only be used at the top level of a namespace or module.
TS1233An export declaration can only be used at the top level of a namespace or module.
TS1234An ambient module declaration is only allowed at the top level in a file.
TS1235A namespace declaration is only allowed at the top level of a namespace or module.
TS1236The return type of a property decorator function must be either 'void' or 'any'.
TS1237The return type of a parameter decorator function must be either 'void' or 'any'.
TS1238Unable to resolve signature of class decorator when called as an expression.
TS1239Unable to resolve signature of parameter decorator when called as an expression.
TS1240Unable to resolve signature of property decorator when called as an expression.
TS1241Unable to resolve signature of method decorator when called as an expression.
TS1242'abstract' modifier can only appear on a class, method, or property declaration.
TS1243'{0}' modifier cannot be used with '{1}' modifier.
TS1244Abstract methods can only appear within an abstract class.
TS1245Method '{0}' cannot have an implementation because it is marked abstract.
TS1246An interface property cannot have an initializer.
TS1247A type literal property cannot have an initializer.
TS1248A class member cannot have the '{0}' keyword.
TS1249A decorator can only decorate a method implementation, not an overload.

Other families: JavaScript, Node.js, npm, React, Next.js, Vite, webpack, Jest