I wanted to use JS type checking capability inside VScode. Everything works like charm but React.Fragment is linted with error:
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)
And this is not all, even imported components from material-ui show simillar ts(2605) error.
My jsconfig.json is:
{
"compilerOptions": {
"module": "commonjs",
"checkJs": true,
"target": "esnext",
"jsx": "react",
"allowSyntheticDefaultImports": true
},
"include": [
"./**/*"
]
}
Can someone help me please to find out what am I doing wrong?
Thanks.