declare type TJSONPCallbackRegistryFunction = (response: T) => void; declare type TJSONPCallback = (err: Error | null, data: T | null) => void; declare global { interface Window { callbackRegistry: { [key: string]: TJSONPCallbackRegistryFunction; }; } } /** * Simple implementation of JSONP. * It creates window.callbackRegistry to minimize global window pollution. * It uses callback to prevent adding the promise polyfill. */ export default function JSONP(url: string, callback?: TJSONPCallback, callbackName?: string): void; export {};