If I use a typescript tuple in my react-app i get a eslint error on line 1 in vscode?

create-react-app, reactjs, typescript

Solution

The Problem

The problem is when you created the tuple type `[string, boolean]` this is a new way to declare types with arrays introduced in Typescript 4.0 called Labeled Tuple Types.

The Solution

Upgrade your react-scripts to v4 (Here is the issue on their github). If you are using `yarn` use the command `yarn upgrade react-scripts@4.0.1`. With npm should be something similar, you can try `npm install react-scripts@4.0.1`

Problem

The error is `Parsing error: Cannot read property 'map' of undefined` I set up a new file just to reproduce the error: ``` export default () => { let something: [string, boolean] something = ['something', true]; } ``` am i missing something? all other types seem to work fine.

Original source