You need the declare global
declare global {
interface Window {
fetch:(url: string, options?: {}) => Promise<any>
}
}
This works then:
window.fetch('/blah').then(...);
You need the declare global
declare global {
interface Window {
fetch:(url: string, options?: {}) => Promise<any>
}
}
This works then:
window.fetch('/blah').then(...);