feat(core): add PluginConfig interface

closes #996
This commit is contained in:
Ibby 2017-01-22 17:24:43 -05:00
parent 9f98f8ef46
commit b983de2145

View File

@ -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