Skip to content
JS
Errors

TypeScript errors

TSxxxx compiler errors.

1,407 entries0 written pages
Showing 601 to 650 of 1,407Source: TypeScript diagnosticMessages.json
CodeError
TS2495Type '{0}' is not an array type or a string type.
TS2496The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression.
TS2497This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export.
TS2498Module '{0}' uses 'export =' and cannot be used with 'export *'.
TS2499An interface can only extend an identifier/qualified-name with optional type arguments.
TS2500A class can only implement an identifier/qualified-name with optional type arguments.
TS2501A rest element cannot contain a binding pattern.
TS2502'{0}' is referenced directly or indirectly in its own type annotation.
TS2503Cannot find namespace '{0}'.
TS2504Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.
TS2505A generator cannot have a 'void' type annotation.
TS2506'{0}' is referenced directly or indirectly in its own base expression.
TS2507Type '{0}' is not a constructor function type.
TS2508No base constructor has the specified number of type arguments.
TS2509Base constructor return type '{0}' is not an object type or intersection of object types with statically known members.
TS2510Base constructors must all have the same return type.
TS2511Cannot create an instance of an abstract class.
TS2512Overload signatures must all be abstract or non-abstract.
TS2513Abstract method '{0}' in class '{1}' cannot be accessed via super expression.
TS2514A tuple type cannot be indexed with a negative value.
TS2515Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'.
TS2516All declarations of an abstract method must be consecutive.
TS2517Cannot assign an abstract constructor type to a non-abstract constructor type.
TS2518A 'this'-based type guard is not compatible with a parameter-based type guard.
TS2519An async iterator must have a 'next()' method.
TS2520Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.
TS2522The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method.
TS2523'yield' expressions cannot be used in a parameter initializer.
TS2524'await' expressions cannot be used in a parameter initializer.
TS2526A 'this' type is available only in a non-static member of a class or interface.
TS2527The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.
TS2528A module cannot have multiple default exports.
TS2529Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.
TS2530Property '{0}' is incompatible with index signature.
TS2531Object is possibly 'null'.
TS2532Object is possibly 'undefined'.
TS2533Object is possibly 'null' or 'undefined'.
TS2534A function returning 'never' cannot have a reachable end point.
TS2536Type '{0}' cannot be used to index type '{1}'.
TS2537Type '{0}' has no matching index signature for type '{1}'.
TS2538Type '{0}' cannot be used as an index type.
TS2539Cannot assign to '{0}' because it is not a variable.
TS2540Cannot assign to '{0}' because it is a read-only property.
TS2542Index signature in type '{0}' only permits reading.
TS2543Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference.
TS2544Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference.
TS2545A mixin class must have a constructor with a single rest parameter of type 'any[]'.
TS2547The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property.
TS2548Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.
TS2549Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator.

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