mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
parent
9f98f8ef46
commit
b983de2145
@ -320,6 +320,36 @@ export const wrap = function(pluginObj: any, methodName: string, opts: any = {})
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
export interface PluginConfig {
|
||||
/**
|
||||
* Plugin name, this should match the class name
|
||||
*/
|
||||
pluginName: string;
|
||||
/**
|
||||
* Plugin NPM package name
|
||||
*/
|
||||
plugin: string;
|
||||
/**
|
||||
* Plugin object reference
|
||||
*/
|
||||
pluginRef: string;
|
||||
/**
|
||||
* Github repository URL
|
||||
*/
|
||||
repo: string;
|
||||
/**
|
||||
* Custom install command
|
||||
*/
|
||||
install?: string;
|
||||
/**
|
||||
* Supported platforms
|
||||
*/
|
||||
platforms?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
@ -339,7 +369,7 @@ export const wrap = function(pluginObj: any, methodName: string, opts: any = {})
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
export function Plugin(config) {
|
||||
export function Plugin(config: PluginConfig) {
|
||||
return function(cls) {
|
||||
|
||||
// Add these fields to the class
|
||||
|
Loading…
Reference in New Issue
Block a user