我已经将我的Angular应用程序从14升级到了15版。升级后,我收到以下错误Error: node_modules/preact/src/jsx.d.ts:1078:3 - error TS2552: Cannot find name 'PictureInPictureEvent'. Did you mean 'PictureInPictureEventHandler'?
然后呢node_modules/preact/src/jsx.d.ts:1124:3 - error TS2344: Type 'TargetedPictureInPictureEvent<Target>' does not satisfy the constraint 'TargetedEvent<EventTarget, Event>'.
下面是配置详细信息
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"target": "ES2022",
"downlevelIteration": true,
"declaration": false,
"importHelpers": true,
"lib": [
"ES2022",
"dom"
],
"module": "esnext",
"moduleResolution": "node",
"sourceMap": true,
"experimentalDecorators": true,
"removeComments": false,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"node_modules/@types"
],
"watch": false
},
"exclude": [
"node_modules"
],
"angularCompilerOptions": {
"strictInjectionParameters": true
}
}
我做错了什么?
1条答案
按热度按时间hmtdttj41#
您需要使用TS 4.9+ w/ Preact v10.15.0。您可以升级您的TS版本或降级Preact。
您可以点击此链接,以供参考link