diff --git a/lib/types/plugin.d.ts b/lib/types/plugin.d.ts index 2be5b9cf3..61cd5f3ee 100644 --- a/lib/types/plugin.d.ts +++ b/lib/types/plugin.d.ts @@ -107,6 +107,17 @@ export interface PluginBase { ___$type_of_plugin_decorations$___?: D; } +/** + * A plugin that is registered by name and version. + */ +export interface NamedPlugin extends PluginBase, PluginNameVersion {} + +/** + * A plugin that is registered by its package.json file. + */ +export interface PackagedPlugin extends PluginBase, PluginPackage {} + + /** * Plugins provide a way to organize application code by splitting the server logic into smaller components. Each * plugin can manipulate the server through the standard server interface, but with the added ability to sandbox @@ -116,7 +127,7 @@ export interface PluginBase { * * The type T is the type of the plugin options. */ -export type Plugin = PluginBase & (PluginNameVersion | PluginPackage); +export type Plugin = NamedPlugin | PackagedPlugin; /** * The realm object contains sandboxed server settings specific to each plugin or authentication strategy. When registering a plugin or an authentication scheme, a server object reference is provided