This commit is contained in:
19
src/tests.ts
19
src/tests.ts
@@ -9,12 +9,8 @@ abstract class Identified<ID> {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class ProvideIdentified<ID> extends Identified<ID> {
|
||||
id!: ID
|
||||
}
|
||||
|
||||
abstract class Permissible {
|
||||
protected permissions: string[] = []
|
||||
permissions: string[] = []
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +19,16 @@ class User extends mixTraits(
|
||||
// Identified<string>,
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user