/** * * * @export * @abstract * @class PrimativeNumberBase */ export declare abstract class PrimativeNumberBase { /** * Minimum value of this primative number * * @abstract * @type {(bigint | number)} * @memberof PrimativeNumberBase */ abstract readonly min: bigint | number; /** * Maximum value of this primative number * * @abstract * @type {(bigint | number)} * @memberof PrimativeNumberBase */ abstract readonly max: bigint | number; /** * Validates if the value for this primative * is valid or not. * * @example const x = new Int8(129); x.validate() // throws OutOfRangeError * * @abstract * @memberof PrimativeNumberBase * @throws {OutOfRangeError} */ abstract validate(): void; abstract createArray(length: number): Array>; } export declare class PrimativeNumberArray extends Array { constructor(length: number); } /** * * * @export * @abstract * @class PrimativeNumberBigInt * @extends {PrimativeNumberBase} */ export declare abstract class PrimativeNumberBigInt extends PrimativeNumberBase { abstract readonly min: bigint; abstract readonly max: bigint; private _value; constructor(value?: bigint); get value(): bigint; set value(x: bigint); validate(): void; isInRange(value: bigint): boolean; } /** * * * @export * @abstract * @class PrimativeNumber * @extends {PrimativeNumberBase} */ export declare abstract class PrimativeNumber extends PrimativeNumberBase { private _value; abstract readonly min: number; abstract readonly max: number; constructor(_value?: number); get value(): number; set value(x: number); validate(): void; get isValid(): boolean; isInRange(value: number): boolean; }