style(uptime): remove the unneeded comments

perf(uptime): add promise return type
This commit is contained in:
Silviu Bogdan Stroe 2018-04-06 16:11:55 +03:00
parent 6be38328b0
commit 35ad7f6387

View File

@ -23,24 +23,23 @@ import {Plugin, Cordova, IonicNativePlugin} from '@ionic-native/core';
*/ */
@Plugin({ @Plugin({
pluginName: 'Uptime', pluginName: 'Uptime',
plugin: 'cordova-plugin-uptime', // npm package name, example: cordova-plugin-camera plugin: 'cordova-plugin-uptime',
pluginRef: 'Uptime', // the variable reference to call the plugin, example: navigator.geolocation pluginRef: 'Uptime',
repo: 'https://github.com/s1lviu/cordova-plugin-uptime', // the github repository URL for the plugin repo: 'https://github.com/s1lviu/cordova-plugin-uptime',
install: '', // OPTIONAL install command, in case the plugin requires variables install: '',
installVariables: [], // OPTIONAL the plugin requires variables installVariables: [],
platforms: ['Android'] // Array of platforms supported, example: ['Android', 'iOS'] platforms: ['Android']
}) })
@Injectable() @Injectable()
export class Uptime extends IonicNativePlugin { export class Uptime extends IonicNativePlugin {
/** /**
* This function return system uptime * This function return system uptime
* @return {Promise<any>} Returns a promise that resolves when something happens * @return {Promise<string>} Returns a promise that return the uptime in milliseconds
*/ */
@Cordova() @Cordova()
getUptime(): Promise<any> { getUptime(): Promise<string> {
return; // We add return; here to avoid any IDE / Compiler errors return; // We add return; here to avoid any IDE / Compiler errors
} }
} }