awesome-cordova-plugins/dist/plugins/plugin.d.ts

21 lines
1.1 KiB
TypeScript
Raw Normal View History

2015-11-30 07:20:11 +08:00
export declare const getPlugin: (pluginRef: string) => any;
export declare const isInstalled: (pluginRef: string) => boolean;
export declare const pluginWarn: (pluginName: string, method: string, plugin: string) => void;
export declare const cordovaWarn: (pluginName: string, method: string) => void;
2015-11-29 08:26:55 +08:00
export declare const wrap: (pluginObj: any, methodName: any, opts?: any) => (...args: any[]) => any;
2015-11-30 09:54:45 +08:00
/**
* Class decorator specifying Plugin metadata. Required for all plugins.
*/
2015-11-29 08:26:55 +08:00
export declare function Plugin(config: any): (cls: any) => any;
2015-11-30 09:54:45 +08:00
/**
* Wrap a stub function in a call to a Cordova plugin, checking if both Cordova
* and the required plugin are installed.
*/
export declare function Cordova(opts?: any): (target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>) => {
value: (...args: any[]) => any;
};
/**
* Before calling the original method, ensure Cordova and the plugin are installed.
*/
2015-11-30 07:20:11 +08:00
export declare function RequiresPlugin(target: Function, key: string, descriptor: TypedPropertyDescriptor<any>): TypedPropertyDescriptor<any>;