Skip to content
JS
Errors

TypeScript errors

TSxxxx compiler errors.

1,407 entries0 written pages
Showing 51 to 100 of 1,407Source: TypeScript diagnosticMessages.json
CodeError
TS1065The return type of an async function or method must be the global Promise<T> type.
TS1066In ambient enum declarations member initializer must be constant expression.
TS1068Unexpected token. A constructor, method, accessor, or property was expected.
TS1069Unexpected token. A type parameter name was expected without curly braces.
TS1070'{0}' modifier cannot appear on a type member.
TS1071'{0}' modifier cannot appear on an index signature.
TS1079A '{0}' modifier cannot be used with an import declaration.
TS1084Invalid 'reference' directive syntax.
TS1089'{0}' modifier cannot appear on a constructor declaration.
TS1090'{0}' modifier cannot appear on a parameter.
TS1091Only a single variable declaration is allowed in a 'for...in' statement.
TS1092Type parameters cannot appear on a constructor declaration.
TS1093Type annotation cannot appear on a constructor declaration.
TS1094An accessor cannot have type parameters.
TS1095A 'set' accessor cannot have a return type annotation.
TS1096An index signature must have exactly one parameter.
TS1097'{0}' list cannot be empty.
TS1098Type parameter list cannot be empty.
TS1099Type argument list cannot be empty.
TS1100Invalid use of '{0}' in strict mode.
TS1101'with' statements are not allowed in strict mode.
TS1102'delete' cannot be called on an identifier in strict mode.
TS1103'for await' loops are only allowed within async functions and at the top levels of modules.
TS1104A 'continue' statement can only be used within an enclosing iteration statement.
TS1105A 'break' statement can only be used within an enclosing iteration or switch statement.
TS1106The left-hand side of a 'for...of' statement may not be 'async'.
TS1107Jump target cannot cross function boundary.
TS1108A 'return' statement can only be used within a function body.
TS1109Expression expected.
TS1110Type expected.
TS1111Private field '{0}' must be declared in an enclosing class.
TS1113A 'default' clause cannot appear more than once in a 'switch' statement.
TS1114Duplicate label '{0}'.
TS1115A 'continue' statement can only jump to a label of an enclosing iteration statement.
TS1116A 'break' statement can only jump to a label of an enclosing statement.
TS1117An object literal cannot have multiple properties with the same name.
TS1118An object literal cannot have multiple get/set accessors with the same name.
TS1119An object literal cannot have property and accessor with the same name.
TS1120An export assignment cannot have modifiers.
TS1121Octal literals are not allowed. Use the syntax '{0}'.
TS1123Variable declaration list cannot be empty.
TS1124Digit expected.
TS1125Hexadecimal digit expected.
TS1126Unexpected end of text.
TS1127Invalid character.
TS1128Declaration or statement expected.
TS1129Statement expected.
TS1130'case' or 'default' expected.
TS1131Property or signature expected.
TS1132Enum member expected.

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