This commit is contained in:
@@ -29,19 +29,21 @@ type ExtendStaticAbstractSuper<SuperExpression, StaticAbstract> = (
|
||||
type TraitApplierSuperTag = "@thilawyn/traitify-ts/Super"
|
||||
|
||||
type RemoveAbstractFromImplClass<
|
||||
ImplClassWithAbstract extends (
|
||||
Class<Abstract, []> &
|
||||
StaticAbstract &
|
||||
{ _tag: TraitApplierSuperTag }
|
||||
),
|
||||
Abstract extends object,
|
||||
StaticAbstract extends object,
|
||||
ImplClassWithAbstract extends AbstractClass<object>,
|
||||
Abstract extends AbstractClass<object>,
|
||||
> = (
|
||||
Class<
|
||||
Omit<InstanceType<ImplClassWithAbstract>, keyof Abstract>,
|
||||
Omit<
|
||||
InstanceType<ImplClassWithAbstract>,
|
||||
keyof InstanceType<Abstract>
|
||||
>,
|
||||
|
||||
ConstructorParameters<ImplClassWithAbstract>
|
||||
> &
|
||||
Omit<StaticMembers<ImplClassWithAbstract>, keyof StaticAbstract | "_tag">
|
||||
Omit<
|
||||
StaticMembers<ImplClassWithAbstract>,
|
||||
keyof StaticMembers<Abstract> | "_tag"
|
||||
>
|
||||
)
|
||||
|
||||
|
||||
@@ -130,7 +132,12 @@ export class TraitBuilder<
|
||||
this.traitSuperExpression,
|
||||
this.traitAbstract,
|
||||
this.traitStaticAbstract,
|
||||
apply as unknown as (Super: AbstractClass<object>) => RemoveAbstractFromImplClass<ImplClassWithAbstract, Abstract, StaticAbstract>,
|
||||
apply as unknown as (Super: AbstractClass<object>) => RemoveAbstractFromImplClass<
|
||||
ImplClassWithAbstract,
|
||||
TraitClass<
|
||||
Trait<SuperExpression, Abstract, StaticAbstract, ImplClass>
|
||||
>
|
||||
>,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user