Switched implSuper to a symbol
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2024-02-20 01:12:38 +01:00
parent e66b15e749
commit b3add9aff9

View File

@@ -4,6 +4,8 @@ import { TraitExpression } from "./TraitExpression"
import { Extend, StaticMembers } from "./util"
declare const implSuperSymbol: unique symbol
type ImplSuper<This> = (
This extends TraitBuilder<
any,
@@ -27,7 +29,7 @@ type ImplSuper<This> = (
StaticMembers<ImplClass>,
]>
> &
{ readonly _tag: "@thilawyn/traitify-ts/Super" } // TODO: replace with unique symbol?
{ readonly [implSuperSymbol]: true }
)
: never
)
@@ -94,7 +96,7 @@ export class TraitBuilder<
Simplify<
Omit<
StaticMembers<ImplClassWithAbstract>,
keyof StaticAbstract | "_tag"
keyof StaticAbstract | typeof implSuperSymbol
>
>
),