From b983de2145c31d36efffd5e2fcfb1ca3fc3c2896 Mon Sep 17 00:00:00 2001 From: Ibby Date: Sun, 22 Jan 2017 17:24:43 -0500 Subject: [PATCH] feat(core): add PluginConfig interface closes #996 --- src/plugins/plugin.ts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/plugins/plugin.ts b/src/plugins/plugin.ts index 5914f9b84..ba05da498 100644 --- a/src/plugins/plugin.ts +++ b/src/plugins/plugin.ts @@ -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