diff --git a/src/TraitExpressionBuilder.ts b/src/TraitExpressionBuilder.ts index 4e222ee..89b01ec 100644 --- a/src/TraitExpressionBuilder.ts +++ b/src/TraitExpressionBuilder.ts @@ -16,35 +16,25 @@ type SpreadSupertraits = ( ) -type InstanceExtendable< - Superclass extends AbstractClass, - Traits extends Trait[], -> = ( - Extendable<[ - InstanceType, - ...TraitTuple.MapInstance, - ]> -) - -type StaticMembersExtendable< - Superclass extends AbstractClass, - Traits extends Trait[], -> = ( - Extendable<[ - StaticMembers, - ...TraitTuple.MapStaticMembers, - ]> -) - type BuildTraitExpression< Superclass extends AbstractClass, Traits extends Trait[], > = ( - InstanceExtendable extends false - ? "Type conflict on the instance side." - : StaticMembersExtendable extends false - ? "Type conflict on the static side." - : TraitExpression + Extendable> extends false + ? "Type conflict between the traits abstract definitions." + : Extendable> extends false + ? "Type conflict between the traits static abstract definitions." + : Extendable<[ + InstanceType, + ...TraitTuple.MapImplInstance, + ]> extends false + ? "Type conflict between the traits implementation instance and/or the superclass instance." + : Extendable<[ + StaticMembers, + ...TraitTuple.MapImplStaticMembers, + ]> extends false + ? "Type conflict between the traits implementation static members and/or the superclass static members." + : TraitExpression )