From 04da4b0f59018d71e14f4344e7dbd5391ea1ee2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Sat, 9 Dec 2023 03:03:09 +0100 Subject: [PATCH] Tests --- src/tests.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/tests.ts b/src/tests.ts index 4520fd6..a27d87d 100644 --- a/src/tests.ts +++ b/src/tests.ts @@ -9,12 +9,8 @@ abstract class Identified { } } -abstract class ProvideIdentified extends Identified { - id!: ID -} - abstract class Permissible { - protected permissions: string[] = [] + permissions: string[] = [] } @@ -23,7 +19,16 @@ class User extends mixTraits( // Identified, Permissible, ) { - id: bigint = BigInt(-1) + readonly id: bigint + + constructor(id: bigint) { + super() + this.id = id + } } -const user = new User() +const user1 = new User(BigInt(1)) +const user2 = new User(BigInt(2)) + +console.log(user1.equals(user2)) +console.log(user1.permissions)