Files
awesome-cordova-plugins/src/@ionic-native/core/ionic-native-plugin.ts
T
2018-04-08 18:51:08 +02:00

49 lines
1.0 KiB
TypeScript

import { checkAvailability } from './decorators/common';
import { get } from './util';
export class IonicNativePlugin {
static pluginName: string;
static pluginRef: string;
static plugin: string;
static repo: string;
static platforms: string[];
static install: string;
/**
* Returns a boolean that indicates whether the plugin is installed
* @return {boolean}
*/
static installed(): boolean { return checkAvailability(this.pluginRef) === true; }
/**
* Returns the original plugin object
*/
static getPlugin(): any { return get(window, this.pluginRef); }
/**
* Returns the plugin's name
*/
static getPluginName(): string { return this.pluginName; }
/**
* Returns the plugin's reference
*/
static getPluginRef(): string { return this.pluginRef; }
/**
* Returns the plugin's install name
*/
static getPluginInstallName(): string { return this.plugin; }
/**
* Returns the plugin's supported platforms
*/
static getSupportedPlatforms(): string[] { return this.platforms || []; }
}