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)