diff --git a/src/index.ts b/src/index.ts index 0d273bc..c1ed0f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,9 +18,11 @@ export type Trait< C extends AbstractClass > = Opaque< TraitApplier, - "thilatrait/Trait" + "@thilawyn/thilatrait/Trait" > +export type TraitApplierTag = "@thilawyn/thilatrait/Trait" + /** * Represents the function signature for applying a trait to a parent class. * @template C - The abstract class type. @@ -28,7 +30,7 @@ export type Trait< export type TraitApplier< C extends AbstractClass > = - (Parent: AbstractConstructor) => C + (Parent: Opaque, TraitApplierTag>) => Opaque /** * Returns the class type of a trait. @@ -154,7 +156,7 @@ export function extendsAndExpresses< ) { return traits.reduce( (previous, trait) => trait(previous), - extend, + extend as Opaque, ) as ( AbstractClass< InstanceType &