react-scripts with the cra-template-typescript does not seem to support some features of typescript 4.2. Specifically I get an error when using abstract construct signatures.
Does react-scripts just not support typescript 4.2 yet?
Reproduce
yarn create react-app ts42test --template typescript
- Change typescript version in
package.json to ^4.2.4
- Add
type Constructor<T = {}> = abstract new (...args: any[]) => T; somewhere
yarn start
./src/App.tsx
SyntaxError: /ts42test/src/App.tsx: Missing semicolon (5:35)
3 | import './App.css';
4 |
> 5 | type Constructor<T = {}> = abstract new (...args: any[]) => T;
| ^
6 |
7 | function App() {
8 | return (
react-scriptswith thecra-template-typescriptdoes not seem to support some features of typescript 4.2. Specifically I get an error when using abstract construct signatures.Does
react-scriptsjust not support typescript 4.2 yet?Reproduce
yarn create react-app ts42test --template typescriptpackage.jsonto^4.2.4type Constructor<T = {}> = abstract new (...args: any[]) => T;somewhereyarn start