3
내가 사용의 WebRTC를 찾을 수 없습니다.오류 TS2304 : 나는 성공적으로 사용할 수 <strong>타이프 라이터 1.x에서</strong>에서</p> <p>각도 2의 이름 'RTCPeerConnection'
는 이미오류 TS2304 : 이름 'RTCPeerConnection'을 찾을 수 없습니다
const peerConnection = new RTCPeerConnection(configuration, null);
그러나 타이프 라이터 2.x를로 업데이트 한 후, 내 터미널에서이 오류가 발생했습니다
.
npm install --save-dev @types/webrtc
을했고, 내 IDE WebStorm은 이미 제대로
RTCPeerConnection
의 입력에 연결합니다.
는
RTCPeerConnection
의 타자는 /my-project/node_modules/@types/webrtc/RTCPeerConnection.d.ts에
내 tsconfig.json 파일 :
{
"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
}
}
내가 어떻게 할 수있는 바르게?
감사합니다. 완벽하게 작동합니다. –