UNPKG

@caidrive/shared

Version:

caidrive.shared.components

56 lines (55 loc) 914 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Identifier = void 0; /** * What it does. * * @param name - Parameter description. * @returns Type and description of the returned object. * * @example * ``` * Write me later. * ``` */ class Identifier { /** * */ constructor(value) { this.value = value; } /** * */ equals(id) { /* */ if (id === null || id === undefined) { return false; } /* */ if (!(id instanceof this.constructor)) { return false; } return id.value === this.value; } /** * */ toString() { /* */ return String(this.value); } /** * */ toValue() { /* */ return this.value; } } exports.Identifier = Identifier;