This commit is contained in:
10
src/trait.ts
10
src/trait.ts
@@ -5,8 +5,8 @@ import { StaticMembers } from "./util"
|
|||||||
|
|
||||||
|
|
||||||
type AddAbstractToImpl<
|
type AddAbstractToImpl<
|
||||||
Impl extends Class<object, []>,
|
Impl extends Class<{}, []>,
|
||||||
Abstract extends object,
|
Abstract extends {},
|
||||||
> = (
|
> = (
|
||||||
Class<
|
Class<
|
||||||
InstanceType<Impl> & Abstract,
|
InstanceType<Impl> & Abstract,
|
||||||
@@ -17,7 +17,7 @@ type AddAbstractToImpl<
|
|||||||
|
|
||||||
type RemoveAbstractFromImpl<
|
type RemoveAbstractFromImpl<
|
||||||
ImplWithAbstract extends Class<Abstract, []>,
|
ImplWithAbstract extends Class<Abstract, []>,
|
||||||
Abstract extends object,
|
Abstract extends {},
|
||||||
> = (
|
> = (
|
||||||
Class<
|
Class<
|
||||||
Omit<InstanceType<ImplWithAbstract>, keyof Abstract>,
|
Omit<InstanceType<ImplWithAbstract>, keyof Abstract>,
|
||||||
@@ -30,8 +30,8 @@ type RemoveAbstractFromImpl<
|
|||||||
export type TraitTag = "@thilawyn/traitify-ts/Trait"
|
export type TraitTag = "@thilawyn/traitify-ts/Trait"
|
||||||
|
|
||||||
export type Trait<
|
export type Trait<
|
||||||
Abstract extends object,
|
Abstract extends {},
|
||||||
Impl extends Class<object, []>,
|
Impl extends Class<{}, []>,
|
||||||
> = (
|
> = (
|
||||||
Opaque<{
|
Opaque<{
|
||||||
readonly apply: TraitApplier<
|
readonly apply: TraitApplier<
|
||||||
|
|||||||
Reference in New Issue
Block a user