quick-lint-js

Find bugs in JavaScript programs.

E0299: abstract methods cannot be marked as a generator

* on a method allows using the yield keyword in the body of the method. Abstract class methods do not have bodies. Therefore, * does not make sense on abstract methods, and it is a syntax error to write it:

abstract class RandomSource {
  abstract *makeRandomNumbers(): Generator<number>;
}

To fix this error, remove the *:

abstract class RandomSource {
  abstract makeRandomNumbers(): Generator<number>;
}

Introduced in quick-lint-js version 2.10.0.

Documentation for other errors