3
私は活字体1.xのの角2エラーTS2304:名前を見つけることができません「RTCPeerConnection」
でのWebRTCを使用していますが、私は成功し、これを使用することができます。
const peerConnection = new RTCPeerConnection(configuration, null);
しかし活字体2.xのに更新した後、私は私の端末でこのエラーを得た:
エラーTS2304: 'RTCPeerConnection' 名前を見つけることができません。
私はすでにnpm install --save-dev @types/webrtc
でした。私のIDE WebStormはすでにRTCPeerConnection
のタイピングに正しくリンクしています。
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"module": "commonjs",
"removeComments": true,
"sourceMap": true,
"lib": ["es6", "dom"]
},
"include": [
"node_modules/@types/**/*.d.ts",
"src/**/*.ts"
],
"exclude": [
"node_modules",
"!node_modules/@types/**/*.d.ts"
],
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
私はそれをどのように操作を行うことができます。RTCPeerConnection
の
タイピング/my-project/node_modules/@types/webrtc/RTCPeerConnection.d.ts
マイtsconfig.jsonファイルであります正しく?
ありがとう、完璧な作品! –