All checks were successful
continuous-integration/drone/push Build is passing
Sets up project build and CI Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://git.jvalver.de/Thilawyn/thilatrait/pulls/1
30 lines
474 B
TypeScript
30 lines
474 B
TypeScript
import { mixTraits } from "./trait"
|
|
|
|
|
|
abstract class Identified<ID> {
|
|
abstract id: ID
|
|
|
|
equals(el: Identified<ID>) {
|
|
return this.id === el.id
|
|
}
|
|
}
|
|
|
|
abstract class ProvideIdentified<ID> extends Identified<ID> {
|
|
id!: ID
|
|
}
|
|
|
|
abstract class Permissible {
|
|
protected permissions: string[] = []
|
|
}
|
|
|
|
|
|
class User extends mixTraits(
|
|
Identified<bigint>,
|
|
// Identified<string>,
|
|
Permissible,
|
|
) {
|
|
id: bigint = BigInt(-1)
|
|
}
|
|
|
|
const user = new User()
|