ExtendsAndExpressesReturnType refactoring
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2024-02-02 03:27:47 +01:00
parent 939772c89c
commit 01d59f2cef

View File

@@ -95,15 +95,15 @@ type ExtendsAndExpressesReturnType<
Super extends AbstractClass<any>,
Traits extends readonly Trait<any, any>[],
> = (
Call<Tuples.IsEmpty, Traits> extends false ?
AbstractMembersExtendable<Super, Traits> extends true ?
ImplInstanceExtendable<Super, Traits> extends true ?
ImplStaticMembersExtendable<Super, Traits> extends true ?
TraitExpression<Super, Traits>
: "Type conflict between the traits implementation static members and/or the superclass static members."
: "Type conflict between the traits implementation instances and/or the superclass instance."
: "Type conflict between the traits abstract members and/or the superclass instance."
: "Cannot express an empty list of traits."
Call<Tuples.IsEmpty, Traits> extends true
? "Cannot express an empty list of traits."
: AbstractMembersExtendable<Super, Traits> extends false
? "Type conflict between the traits abstract members and/or the superclass instance."
: ImplInstanceExtendable<Super, Traits> extends false
? "Type conflict between the traits implementation instances and/or the superclass instance."
: ImplStaticMembersExtendable<Super, Traits> extends false
? "Type conflict between the traits implementation static members and/or the superclass static members."
: TraitExpression<Super, Traits>
)
export function extendsAndExpresses<