I'm working on a typescript project that makes use of fetch at some point.
I know that I can use typings to make the definition of fetch globally available:
typings install --global --save dt~whatwg-fetch
&
typings install --global --save dt~whatwg-streams
BUT I am trying to move away from my dependency on typings and instead use npm and @types.
I can't figure out how to make this work however.
I've done npm install @types/whatwg-fetch and adding fetch to the compilerOptions.types array of my tsconfig.json file but I still get an error: Error Cannot find type definition file for 'fetch'.