我在vscode中得到错误,但一切都正常工作。一些错误:
第一个月
[{
"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.
.
的数据
的
1条答案
按热度按时间d8tt03nd1#
我可以通过更新我的tslog.json文件中的“jsx”设置来解决这个问题。最初,它被设置为“jsx”:“react”,但将其更改为“jsx”:“preserve”为我解决了这个问题。下面是来自我的
tsconfig.json
的更新片段:字符串
此外,我更新了TypeScript版本以使用工作区版本。