Skip to content
JS
Errors

TypeScript errors

TSxxxx compiler errors.

1,407 entries0 written pages
Showing 301 to 350 of 1,407Source: TypeScript diagnosticMessages.json
CodeError
TS1379An import alias cannot reference a declaration that was exported using 'export type'.
TS1380An import alias cannot reference a declaration that was imported using 'import type'.
TS1381Unexpected token. Did you mean `{'}'}` or `}`?
TS1382Unexpected token. Did you mean `{'>'}` or `>`?
TS1385Function type notation must be parenthesized when used in a union type.
TS1386Constructor type notation must be parenthesized when used in a union type.
TS1387Function type notation must be parenthesized when used in an intersection type.
TS1388Constructor type notation must be parenthesized when used in an intersection type.
TS1389'{0}' is not allowed as a variable declaration name.
TS1390'{0}' is not allowed as a parameter name.
TS1392An import alias cannot use 'import type'
TS1431'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports....
TS1432Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18',...
TS1433Neither decorators nor modifiers may be applied to 'this' parameters.
TS1434Unexpected keyword or identifier.
TS1435Unknown keyword or identifier. Did you mean '{0}'?
TS1436Decorators must precede the name and all keywords of property declarations.
TS1437Namespace must be given a name.
TS1438Interface must be given a name.
TS1439Type alias must be given a name.
TS1440Variable declaration not allowed at this location.
TS1441Cannot start a function call in a type annotation.
TS1442Expected '=' for property initializer.
TS1443Module declaration names may only use ' or " quoted strings.
TS1448'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled.
TS1451Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on...
TS1453`resolution-mode` should be either `require` or `import`.
TS1454`resolution-mode` can only be set for type-only imports.
TS1455`resolution-mode` is the only valid key for type import assertions.
TS1456Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`.
TS1470The 'import.meta' meta-property is not allowed in files which will build into CommonJS output.
TS1471Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with...
TS1472'catch' or 'finally' expected.
TS1473An import declaration can only be used at the top level of a module.
TS1474An export declaration can only be used at the top level of a module.
TS1477An instantiation expression cannot be followed by a property access.
TS1478Identifier or string literal expected.
TS1479The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and...
TS1484'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
TS1485'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
TS1486Decorator used before 'export' here.
TS1487Octal escape sequences are not allowed. Use the syntax '{0}'.
TS1488Escape sequence '{0}' is not allowed.
TS1489Decimals with leading zeros are not allowed.
TS1490File appears to be binary.
TS1491'{0}' modifier cannot appear on a 'using' declaration.
TS1492'{0}' declarations may not have binding patterns.
TS1493The left-hand side of a 'for...in' statement cannot be a 'using' declaration.
TS1494The left-hand side of a 'for...in' statement cannot be an 'await using' declaration.
TS1495'{0}' modifier cannot appear on an 'await using' declaration.

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