Closed Yserz closed 4 years ago
Hi,
It looks like the event types of reconnecting-websocket v4.2.0 conflict with the built in types DOM types in TypeScript v3.7.2.
reconnecting-websocket v4.2.0
TypeScript v3.7.2
node_modules/reconnecting-websocket/dist/reconnecting-websocket.d.ts:7:10 - error TS2440: Import declaration conflicts with local declaration of 'CloseEvent'. 7 import { CloseEvent, ErrorEvent, Event, WebSocketEventListenerMap } from './events'; ~~~~~~~~~~ node_modules/reconnecting-websocket/dist/reconnecting-websocket.d.ts:7:22 - error TS2440: Import declaration conflicts with local declaration of 'ErrorEvent'. 7 import { CloseEvent, ErrorEvent, Event, WebSocketEventListenerMap } from './events'; ~~~~~~~~~~ node_modules/reconnecting-websocket/dist/reconnecting-websocket.d.ts:7:34 - error TS2440: Import declaration conflicts with local declaration of 'Event'. 7 import { CloseEvent, ErrorEvent, Event, WebSocketEventListenerMap } from './events';
tsconfig
{ "compilerOptions": { "allowJs": true, "allowSyntheticDefaultImports": true, "alwaysStrict": true, "baseUrl": ".", "declaration": false, "downlevelIteration": true, "forceConsistentCasingInFileNames": true, "jsx": "react", "lib": ["dom", "es2017"], "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, "noImplicitReturns": true, "noUnusedLocals": true, "sourceMap": true, "target": "es6" }, }
See https://github.com/pladaria/reconnecting-websocket/pull/113 and https://github.com/pladaria/reconnecting-websocket/pull/114 :wink:
fixed by #113
Hi,
It looks like the event types of
reconnecting-websocket v4.2.0
conflict with the built in types DOM types inTypeScript v3.7.2
.tsconfig