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
|
* @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) {
|
return function(cls) {
|
||||||
|
|
||||||
// Add these fields to the class
|
// Add these fields to the class
|
||||||
|
Loading…
Reference in New Issue
Block a user