alert promise changed to promise<void>

This commit is contained in:
Vladimir Enchev
2014-06-04 08:09:36 +03:00
parent 5095c5a5a7
commit c419fbdba4
3 changed files with 6 additions and 6 deletions

View File

@ -12,8 +12,8 @@ function createAlertDialog(options: dialogs.DialogOptions): android.app.AlertDia
return alert;
}
export function alert(arg: any): promises.Promise<any> {
var d = promises.defer<any>();
export function alert(arg: any): promises.Promise<void> {
var d = promises.defer<void>();
try {
var options = typeof arg === "string" ? { message: arg, title: "Alert", buttonName: "OK" } : arg

View File

@ -4,13 +4,13 @@
* The alert() method displays an alert box with a specified message.
* @param message Specifies the text to display in the alert box.
*/
function alert(message: string): promises.Promise<any>;
function alert(message: string): promises.Promise<void>;
/**
* The alert() method displays an alert box with a specified options.
* @param options Specifies the options for the alert box.
*/
function alert(options: AlertOptions): promises.Promise<any>;
function alert(options: AlertOptions): promises.Promise<void>;
/**
* The confirm() method displays a dialog box with a specified message.

View File

@ -29,8 +29,8 @@ function createDelegate(callback) {
return new delegateType;
}
export function alert(arg: any): promises.Promise<any> {
var d = promises.defer<any>();
export function alert(arg: any): promises.Promise<void> {
var d = promises.defer<void>();
try {
var options = typeof arg === STRING ? { message: arg, title: ALERT, buttonName: OK } : arg