quick-lint-js

Find bugs in JavaScript programs.

E0319: missing name for element in named tuple type

In TypeScript, a tuple type can have names for each element. It is a syntax error to name some but not all tuple type elements:

function bsearch(a): [number, hi: number] {
  /* ... */
}

To fix this error, write a name for the tuple element:

function bsearch(a): [lo: number, hi: number] {
  /* ... */
}

Alternatively, delete the names of other tuple elements:

function bsearch(a): [number, number] {
  /* ... */
}

Introduced in quick-lint-js version 2.10.0.

Documentation for other errors