diff --git a/src/TraitExpressionBuilder.ts b/src/TraitExpressionBuilder.ts index fc7c04e..53abdf4 100644 --- a/src/TraitExpressionBuilder.ts +++ b/src/TraitExpressionBuilder.ts @@ -19,9 +19,9 @@ type AbstractMembersExtendable< Superclass extends AbstractClass<{}>, Traits extends Trait[], > = ( - Call, - ...Call, Traits>, + Pipe, + Tuples.Prepend>, ]> ) @@ -29,9 +29,9 @@ type ImplInstanceExtendable< Superclass extends AbstractClass<{}>, Traits extends Trait[], > = ( - Call, - ...Call, Traits>, + Pipe, + Tuples.Prepend>, ]> ) @@ -39,10 +39,9 @@ type ImplStaticMembersExtendable< Superclass extends AbstractClass<{}>, Traits extends Trait[], > = ( - Pipe<[ - Superclass, - ...Call, Traits>, - ], [ + Pipe, + Tuples.Prepend, Tuples.Map, ExtendableFn, ]> @@ -53,15 +52,13 @@ type BuildTraitExpression< OwnTraits extends Trait[], AllTraits extends Trait[], > = ( - Call extends true - ? "Cannot express an empty list of traits." - : AbstractMembersExtendable extends false - ? "Type conflict between the traits abstract members and/or the superclass instance." - : ImplInstanceExtendable extends false - ? "Type conflict between the traits implementation instances and/or the superclass instance." - : ImplStaticMembersExtendable extends false - ? "Type conflict between the traits implementation static members and/or the superclass static members." - : TraitExpression + AbstractMembersExtendable extends false + ? "Type conflict between the traits abstract members and/or the superclass instance." + : ImplInstanceExtendable extends false + ? "Type conflict between the traits implementation instances and/or the superclass instance." + : ImplStaticMembersExtendable extends false + ? "Type conflict between the traits implementation static members and/or the superclass static members." + : TraitExpression )