forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ngbootbox.d.ts
38 lines (33 loc) · 1.04 KB
/
ngbootbox.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Type definitions for ngbootbox
// Project: https://github.com/eriktufvesson/ngBootbox
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../es6-promise/es6-promise.d.ts" />
/// <reference path="../bootbox/bootbox.d.ts" />
interface NgBootboxDialog {
title?: string;
message?: string;
templateUrl?: string;
locale?: string;
callback?: () => any;
onEscape?: () => any | boolean;
show?: boolean;
backdrop?: boolean;
closeButton?: boolean;
animate?: boolean;
className?: string;
size?: string;
buttons?: BootboxButtonMap;
}
interface BootboxService {
alert(msg: string): Promise<any>;
confirm(msg: string): Promise<any>;
prompt(msg: string): Promise<any>;
customDialog(options: NgBootboxDialog): void;
setDefaults(options: BootboxDefaultOptions): void;
hideAll(): void;
addLocale(name: string, values: BootboxLocaleValues): void;
removeLocale(name: string): void;
setLocale(name: string): void;
}
declare var $ngBootbox: BootboxService;