declare type CONTEXT = { app_version: string; immersive: boolean; appearance: 'light' | 'dark'; currency: string; locale: string; platform: 'iOS' | 'Android' | 'Desktop'; conversation_id: string; [props: string]: any; }; interface MESSAGERS { getContext: () => CONTEXT; playlist: (audios: string[]) => any; reloadTheme: (args?: string) => void; showToast: (msg: string) => void; } declare global { interface Window { webkit?: { messageHandlers?: { MixinContext?: any; playlist?: { postMessage: MESSAGERS['playlist']; }; reloadTheme?: { postMessage: MESSAGERS['reloadTheme']; }; }; }; MixinContext?: { getContext?: MESSAGERS['getContext']; playlist?: MESSAGERS['playlist']; reloadTheme?: MESSAGERS['reloadTheme']; showToast?: MESSAGERS['showToast']; }; } } export declare function messager(type: T): MESSAGERS[T]; export default messager;