From b3add9aff9b493e9bf77ae6cfaac5728f16e50a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Tue, 20 Feb 2024 01:12:38 +0100 Subject: [PATCH] Switched implSuper to a symbol --- src/TraitBuilder.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TraitBuilder.ts b/src/TraitBuilder.ts index 856d63c..3272b11 100644 --- a/src/TraitBuilder.ts +++ b/src/TraitBuilder.ts @@ -4,6 +4,8 @@ import { TraitExpression } from "./TraitExpression" import { Extend, StaticMembers } from "./util" +declare const implSuperSymbol: unique symbol + type ImplSuper = ( This extends TraitBuilder< any, @@ -27,7 +29,7 @@ type ImplSuper = ( StaticMembers, ]> > & - { 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, - keyof StaticAbstract | "_tag" + keyof StaticAbstract | typeof implSuperSymbol > > ),