In my example, I\'m trying to extend the TS Window interface to include a polyfill for fetch. Why doesn\'t matter. The question is \"how do I tell T
fetch
You need the declare global
declare global
declare global { interface Window { fetch:(url: string, options?: {}) => Promise } }
This works then:
window.fetch('/blah').then(...);