Issue
i get errors in vscode but every thing works correctly . some errors :
Type expected.
[{
"resource": "/C:/Users/Dell/Desktop/vite-project/src/App.tsx",
"owner": "typescript",
"code": "1110",
"severity": 8,
"message": "Type expected.",
"source": "ts",
"startLineNumber": 10,
"startColumn": 6,
"endLineNumber": 10,
"endColumn": 7
}]
Cannot find name 'div'.
'>' expected.
...
Solution
I was able to resolve the issue by updating the "jsx" setting in my tsconfig.json file. Initially, it was set to "jsx": "react", but changing it to "jsx": "preserve" solved the problem for me.
Here's the updated snippet from my tsconfig.json
:
{
"compilerOptions": {
// ...
"jsx": "preserve"
}
}
Additionally, I updated the TypeScript version to use the workspace version.
Answered By - B A.J Amar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.