Skip to content
JS
Errors

TypeScript errors

TSxxxx compiler errors.

1,407 entries0 written pages
Showing 901 to 950 of 1,407Source: TypeScript diagnosticMessages.json
CodeError
TS2836Import assertions are not allowed on statements that compile to CommonJS 'require' calls.
TS2837Import assertion values must be string literal expressions.
TS2838All declarations of '{0}' must have identical constraints.
TS2839This condition will always return '{0}' since JavaScript compares objects by reference, not value.
TS2840An interface cannot extend a primitive type like '{0}'. It can only extend other named object types.
TS2842'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?
TS2843We can only write a type for '{0}' by adding a type for the entire parameter here.
TS2844Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.
TS2845This condition will always return '{0}'.
TS2846A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?
TS2848The right-hand side of an 'instanceof' expression must not be an instantiation expression.
TS2849Target signature provides too few arguments. Expected {0} or more, but got {1}.
TS2850The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'.
TS2851The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method,...
TS2852'await using' statements are only allowed within async functions and at the top levels of modules.
TS2853'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports....
TS2854Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18',...
TS2855Class field '{0}' defined by the parent class is not accessible in the child class via super.
TS2856Import attributes are not allowed on statements that compile to CommonJS 'require' calls.
TS2857Import attributes cannot be used with type-only imports or exports.
TS2858Import attribute values must be string literal expressions.
TS2859Excessive complexity comparing types '{0}' and '{1}'.
TS2860The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]'...
TS2861An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof'...
TS2862Type '{0}' is generic and can only be indexed for reading.
TS2863A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values.
TS2864A class cannot implement a primitive type like '{0}'. It can only implement other named object types.
TS2865Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled.
TS2866Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled.
TS2867Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`.
TS2868Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types...
TS2869Right operand of ?? is unreachable because the left operand is never nullish.
TS2870This binary expression is never nullish. Are you missing parentheses?
TS2871This expression is always nullish.
TS2872This kind of expression is always truthy.
TS2873This kind of expression is always falsy.
TS2874This JSX tag requires '{0}' to be in scope, but it could not be found.
TS2875This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package...
TS2876This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".
TS2877This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a...
TS2878This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is...
TS2879Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found.
TS2880Import assertions have been replaced by import attributes. Use 'with' instead of 'assert'.
TS2881This expression is never nullish.
TS2882Cannot find module or type declarations for side-effect import of '{0}'.
TS2883The inferred type of '{0}' cannot be named without a reference to '{2}' from '{1}'. This is likely not portable. A type annotation is...
TS4000Import declaration '{0}' is using private name '{1}'.
TS4002Type parameter '{0}' of exported class has or is using private name '{1}'.
TS4004Type parameter '{0}' of exported interface has or is using private name '{1}'.
TS4006Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.

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