0.1.1 #8
@@ -31,7 +31,7 @@ export type TraitApplier<
|
||||
(Parent: AbstractConstructor<any>) => C
|
||||
|
||||
/**
|
||||
* Unwraps the type of the class from a given trait.
|
||||
* Returns the class type of a trait.
|
||||
* @template T - The trait type.
|
||||
*/
|
||||
export type TraitClass<T> =
|
||||
@@ -39,6 +39,10 @@ export type TraitClass<T> =
|
||||
? C
|
||||
: never
|
||||
|
||||
/**
|
||||
* Returns the instance type of a trait.
|
||||
* @template T - The trait type.
|
||||
*/
|
||||
export type TraitInstance<T> =
|
||||
T extends Trait<infer C>
|
||||
? InstanceType<C>
|
||||
|
||||
Reference in New Issue
Block a user