chore(): remove returned Promises

Addresses: https://github.com/driftyco/ionic-native/issues/38.
This commit is contained in:
Tim Lancina
2016-03-10 14:54:25 -06:00
parent 738184b5be
commit 78fdbcd42e
5 changed files with 16 additions and 116 deletions
+4 -32
View File
@@ -27,55 +27,27 @@ export class AppVersion {
* @returns {Promise}
*/
@Cordova()
static getAppName () {
// 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
return new Promise<any>((res, rej) => {});
}
static getAppName(): Promise<any> { return }
/**
* Returns the package name of the app
* @returns {Promise}
*/
@Cordova()
static getPackageName () {
// 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
return new Promise<any>((res, rej) => {});
}
static getPackageName(): Promise<any> { return }
/**
* Returns the build identifier of the app
* @returns {Promise}
*/
@Cordova()
static getVersionCode () {
// 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
return new Promise<any>((res, rej) => {});
}
static getVersionCode(): Promise<any> { return }
/**
* Returns the version of the app
* @returns {Promise}
*/
@Cordova()
static getVersionNumber() {
// 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
return new Promise<any>((res, rej) => {});
}
static getVersionNumber(): Promise<any> { return }
}