import { Alert, AlertButton } from 'react-native'; /** * Alert.{function} receives three parameters, the last one being an object: * * @param {string} title text to appear in title * @param {string} body text to appear in body * @param {object} options array of buttons and callbacks * * options properties * @property {string} name object description * @property {function} run callback function to run on press */ type NativeAlertArgs = Parameters; export type OSAlertArgs = { title: NativeAlertArgs['0']; body?: NativeAlertArgs['1']; options?: NativeAlertArgs['2']; }; export type AlertEvent = AlertButton['onPress']; export type OSAlertType = 'info' | 'error' | 'warn' | 'ask'; export type NamedEvents = Partial>; declare function ask({ title, body, options }: OSAlertArgs): void; declare function warn(args: OSAlertArgs & NamedEvents<'onReject' | 'onAccept'>): void; declare function info(args: OSAlertArgs & NamedEvents<'onDismiss'>): void; declare function OSError(args: OSAlertArgs & NamedEvents<'onDismiss'>): void; export declare const OSAlert: { ask: typeof ask; warn: typeof warn; info: typeof info; error: typeof OSError; }; export {}; //# sourceMappingURL=OSAlert.d.ts.map