Could not find a declaration file for module 'event-source-polyfill'. '../node_modules/event-source-polyfill/src/eventsource.js' implicitly has an 'any' type.
Try npm i --save-dev @types/event-source-polyfill if it exists or add a new declaration (.d.ts) file containing declare module 'event-source-polyfill';ts(7016)
import { NativeEventSource, EventSourcePolyfill } from 'event-source-polyfill';
@noobd3v I am using EventSource in my angular project. There is a file named polyfills.ts under root folder. Just add the below into it. Hope this helps.
Could not find a declaration file for module 'event-source-polyfill'. '../node_modules/event-source-polyfill/src/eventsource.js' implicitly has an 'any' type. Try
npm i --save-dev @types/event-source-polyfill
if it exists or add a new declaration (.d.ts) file containingdeclare module 'event-source-polyfill';
ts(7016)import { NativeEventSource, EventSourcePolyfill } from 'event-source-polyfill';