UNPKG

@kakasoo/proto-typescript

Version:

Utility types and implementations based on JavaScript prototypes.

23 lines 629 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TypedDecimal = void 0; const typed_number_class_1 = require("../typed-number.class"); class TypedDecimal { decimal; constructor(data) { if (typeof data === 'number') { this.decimal = data; } else { throw new Error('IS NOT INT FORMAT'); } } toTypedNumber() { return new typed_number_class_1.TypedNumber(this.decimal); } toPrimitive() { return this.decimal; } } exports.TypedDecimal = TypedDecimal; //# sourceMappingURL=typed-decimal.class.js.map