Skip to content
JS
Errors

TypeScript errors

TSxxxx compiler errors.

1,407 entries0 written pages
Showing 251 to 300 of 1,407Source: TypeScript diagnosticMessages.json
CodeError
TS1314Global module exports may only appear in module files.
TS1315Global module exports may only appear in declaration files.
TS1316Global module exports may only appear at top level.
TS1317A parameter property cannot be declared using a rest parameter.
TS1318An abstract accessor cannot have an implementation.
TS1319A default export can only be used in an ECMAScript-style module.
TS1320Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.
TS1321Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member.
TS1322Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member.
TS1323Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd',...
TS1324Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or...
TS1325Argument of dynamic import cannot be spread element.
TS1326This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments.
TS1327String literal with double quotes expected.
TS1328Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal.
TS1329'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?
TS1330A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.
TS1331A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.
TS1332A variable whose type is a 'unique symbol' type must be 'const'.
TS1333'unique symbol' types may not be used on a variable declaration with a binding name.
TS1334'unique symbol' types are only allowed on variables in a variable statement.
TS1335'unique symbol' types are not allowed here.
TS1337An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead.
TS1338'infer' declarations are only permitted in the 'extends' clause of a conditional type.
TS1339Module '{0}' does not refer to a value, but is used as a value here.
TS1340Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?
TS1341Class constructor may not be an accessor.
TS1343The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18',...
TS1344A label is not allowed here.
TS1345An expression of type 'void' cannot be tested for truthiness.
TS1346This parameter is not allowed with 'use strict' directive.
TS1347'use strict' directive cannot be used with non-simple parameter list.
TS1348Non-simple parameter declared here.
TS1349'use strict' directive used here.
TS1351An identifier or keyword cannot immediately follow a numeric literal.
TS1352A bigint literal cannot use exponential notation.
TS1353A bigint literal must be an integer.
TS1354'readonly' type modifier is only permitted on array and tuple literal types.
TS1355A 'const' assertion can only be applied to references to enum members, or string, number, boolean, array, or object literals.
TS1356Did you mean to mark this function as 'async'?
TS1357An enum member name must be followed by a ',', '=', or '}'.
TS1358Tagged template expressions are not permitted in an optional chain.
TS1359Identifier expected. '{0}' is a reserved word that cannot be used here.
TS1360Type '{0}' does not satisfy the expected type '{1}'.
TS1361'{0}' cannot be used as a value because it was imported using 'import type'.
TS1362'{0}' cannot be used as a value because it was exported using 'export type'.
TS1363A type-only import can specify a default import or named bindings, but not both.
TS1368Class constructor may not be a generator.
TS1375'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports....
TS1378Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18',...

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