UNPKG

@caidrive/shared

Version:

caidrive.shared.components

54 lines (53 loc) 944 B
/** * What it does. * * @param name - Parameter description. * @returns Type and description of the returned object. * * @example * ``` * Write me later. * ``` */ import { Result } from "./result"; export type AlphaNumeric = string | number; /** * */ export declare abstract class Enum<T extends AlphaNumeric> { private readonly _name; private readonly _value; protected static _values: any[]; /** * */ /** * * */ protected constructor(_name: string, _value: string | number); /** * */ toString(): string; /** * */ get value(): string | number; /** * */ get name(): string; /** * */ equals(other: Enum<AlphaNumeric>): boolean; /** * */ static find<T extends AlphaNumeric>(criteria: AlphaNumeric): Result<Enum<T>>; /** * */ static contains(criteria: AlphaNumeric): boolean; }