UNPKG

ts-browser-helpers

Version:

A collection of utility classes, functions and decorators for javascript/typescript projects, for use in the browser.

16 lines 696 B
/** * A simple interface for dialog wrappers that can be used to abstract away the browser's built-in dialog methods or custom implementations. * @category Browser */ export interface IDialogWrapper { alert: (message?: string) => Promise<void>; prompt: (message?: string, _default?: string, cancel?: boolean) => Promise<string | null>; confirm: (message?: string) => Promise<boolean>; confirmSync: (message?: string) => boolean; } /** * A dialog wrapper that uses the browser's built-in `window.alert`, `window.prompt`, and `window.confirm` methods. * @category Browser */ export declare const windowDialogWrapper: IDialogWrapper; //# sourceMappingURL=DialogWrapper.d.ts.map