Skip to content

Commit

Permalink
feat(core): add PluginConfig interface
Browse files Browse the repository at this point in the history
closes #996
  • Loading branch information
ihadeed committed Jan 22, 2017
1 parent 9f98f8e commit b983de2
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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
Expand Down

0 comments on commit b983de2

Please sign in to comment.