UNPKG

@kakasoo/proto-typescript

Version:

Utility types and implementations based on JavaScript prototypes.

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