ews-javascript-api
ews-javascript-api copied to clipboard
Could not find a declaration file for module 'fetch'
I am having an issue while trying to compile from typescript :
node_modules/ews-javascript-api/typings/ExchangeWebService.d.ts:3:53 - error TS7016: Could not find a declaration file for module 'fetch'. 'C:/Users
/ZRTW9851/Documents/Projets Orange/tmp2/@doe/worker/node_modules/fetch/lib/fetch.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'fetch';`
3 import { FetchStream, fetchUrl, FetchOptions } from 'fetch';
How to fix this ?
the reason is this repo maintains its own version of type declarations of the dep fetch
... and the dep hasn't been updated for years. no clue of why not choosing a modern polyfill.
to resolve this error, you can copy this file and paste inside your project or somewhere that TypeScript can recognize the declaration files.
as of 0.13 this is using axios and removed support for requestjs and fetch both