This commit is contained in:
Ibrahim Hadeed 2016-03-06 13:24:49 -05:00
parent 6843177377
commit 4302abd02b

View File

@ -296,10 +296,10 @@ export class Push {
@Cordova()
static hasPermission(){
// This Promise is replaced by one from the @Cordova decorator that wraps
// the plugin's callbacks. We provide a dummy one here so TypeScript
// knows that the correct return type is Promise, because there's no way
// for it to know the return type from a decorator.
// See https://github.com/Microsoft/TypeScript/issues/4881
// the plugin's callbacks. We provide a dummy one here so TypeScript
// knows that the correct return type is Promise, because there's no way
// for it to know the return type from a decorator.
// See https://github.com/Microsoft/TypeScript/issues/4881
return new Promise<{ isEnabled: boolean }>((res, rej) => {});
}
}