UNPKG

@hyper-fetch/core

Version:

Cache, Queue and Persist your requests no matter if you are online or offline!

21 lines 1.02 kB
import { default as EventEmitter } from 'events'; /** Create event emitters and listeners for application-level focus, blur, online, and offline state changes. */ export declare const getAppManagerEvents: (emitter: EventEmitter) => { /** Emit when the application window gains focus */ emitFocus: () => void; /** Emit when the application window loses focus */ emitBlur: () => void; /** Emit when the application transitions to online state */ emitOnline: () => void; /** Emit when the application transitions to offline state */ emitOffline: () => void; /** Listen for focus events */ onFocus: (callback: () => void) => VoidFunction; /** Listen for blur events */ onBlur: (callback: () => void) => VoidFunction; /** Listen for online state transitions */ onOnline: (callback: () => void) => VoidFunction; /** Listen for offline state transitions */ onOffline: (callback: () => void) => VoidFunction; }; //# sourceMappingURL=app.manager.events.d.ts.map