From 2332fe2eaaed877248ac845491821cc5eb4179e5 Mon Sep 17 00:00:00 2001 From: Ritzlgrmft Date: Thu, 10 Sep 2015 10:36:36 +0200 Subject: [PATCH] Definitions added for Cordova plugin cordova-plugin-app-version (https://github.com/whiteoctober/cordova-plugin-app-version). --- cordova-plugin-app-version/appversion-tests.ts | 18 ++++++++++++++++++ cordova-plugin-app-version/appversion.d.ts | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 cordova-plugin-app-version/appversion-tests.ts create mode 100644 cordova-plugin-app-version/appversion.d.ts diff --git a/cordova-plugin-app-version/appversion-tests.ts b/cordova-plugin-app-version/appversion-tests.ts new file mode 100644 index 000000000..89858c3e5 --- /dev/null +++ b/cordova-plugin-app-version/appversion-tests.ts @@ -0,0 +1,18 @@ +/// +/// +cordova.getAppVersion.getAppName() + .then(appName=> { + console.log(appName) + }); +cordova.getAppVersion.getPackageName() + .then(packageName=> { + console.log(packageName); + }); +cordova.getAppVersion.getVersionCode() + .then(versionCode=> { + console.log(versionCode); + }); +cordova.getAppVersion.getVersionNumber() + .then(versionNumber=> { + console.log(versionNumber); + }); \ No newline at end of file diff --git a/cordova-plugin-app-version/appversion.d.ts b/cordova-plugin-app-version/appversion.d.ts new file mode 100644 index 000000000..4069e38da --- /dev/null +++ b/cordova-plugin-app-version/appversion.d.ts @@ -0,0 +1,8 @@ +interface Cordova { + getAppVersion: { + getAppName: () => ng.IPromise; + getPackageName: () => ng.IPromise; + getVersionCode: () => ng.IPromise; + getVersionNumber: () => ng.IPromise; + }; +} \ No newline at end of file