jalhyd_object.ts 555 bytes
export interface IJalhydObject {
    readonly uid: string;
export interface INamedObject extends IJalhydObject {
    readonly name: string;
export abstract class JalhydObject implements IJalhydObject {
    public get uid(): string {
        return this._uid;
    public static get nextUID(): string {
        return Buffer.from(Math.random().toString(36).substring(2)).toString("base64").substring(0, 6);
    /** id numérique unique */
    private _uid: string;
    constructor() {
        this._uid = JalhydObject.nextUID;