Я хотел использовать возможность проверки типов JS внутри VScode. Все работает как шарм, но React.Fragment содержит ошибку:
JSX element type 'ReactElement<any>' is not a constructor function for JSX elements.
Type 'ReactElement<any>' is missing the following properties from type 'Element': nodeName, attributes, childrents(2605)
И это еще не все, даже импортированные компоненты из material-ui показывают ошибку simillar ts (2605).
Мой jsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"checkJs": true,
"target": "esnext",
"jsx": "react",
"allowSyntheticDefaultImports": true
},
"include": [
"./**/*"
]
}
Может ли кто-нибудь помочь мне узнать, что я делаю не так?
Спасибо.






это проблема с @ типы / реагировать, пониженная до "@ types / react": "16.7.13".
yarn add @types/[email protected]