diff --git a/index.ts b/index.ts index e3a3078..180b711 100644 --- a/index.ts +++ b/index.ts @@ -25,9 +25,9 @@ export class Base { static plugin(plugin: T) { const currentPlugins = this.plugins; - class BaseWithPlugins extends this { + const BaseWithPlugins = class extends this { static plugins = currentPlugins.concat(plugin); - } + }; type Extension = ReturnTypeOf; return BaseWithPlugins as typeof BaseWithPlugins & Constructor;