Skip to content

Commit

Permalink
refactor: make TypeScript compilation with --declaration happy
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
karol-majewski authored and gr2m committed Oct 30, 2019
1 parent bcea9ba commit 2197c65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export class Base {
static plugin<T extends TestPlugin | TestPlugin[]>(plugin: T) {
const currentPlugins = this.plugins;

class BaseWithPlugins extends this {
const BaseWithPlugins = class extends this {
static plugins = currentPlugins.concat(plugin);
}
};

type Extension = ReturnTypeOf<T>;
return BaseWithPlugins as typeof BaseWithPlugins & Constructor<Extension>;
Expand Down

0 comments on commit 2197c65

Please sign in to comment.