Skip to content

Commit

Permalink
Improve type alias for mixin
Browse files Browse the repository at this point in the history
Still not really applicable when defining a mixin, but still accepted by the @mixin decorator.
  • Loading branch information
aedart committed Feb 4, 2024
1 parent abc14e3 commit 420c2e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/contracts/src/support/mixins/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Constructor, AbstractConstructor} from "@aedart/contracts";
import type { AbstractConstructor } from "@aedart/contracts";

/**
* Abstract subclass or "Mix-in"
Expand All @@ -14,5 +14,5 @@ import type {Constructor, AbstractConstructor} from "@aedart/contracts";
*/
export type Mixin<
SuperClass extends AbstractConstructor = object,
MixinClass extends Constructor = object
> = (superclass: SuperClass) => SuperClass & MixinClass;
AbstractSubclass extends AbstractConstructor = object
> = (superclass: SuperClass) => AbstractSubclass & SuperClass;

0 comments on commit 420c2e8

Please sign in to comment.