UNPKG

veffect

Version:

powerful TypeScript validation library built on the robust foundation of Effect combining exceptional type safety, high performance, and developer experience. Taking inspiration from Effect's functional principles, VEffect delivers a balanced approach tha

30 lines (29 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDecodeException = exports.encoder = exports.decoder = exports.DecodeExceptionTypeId = exports.DecodeException = void 0; var _Predicate = /*#__PURE__*/require("../../Predicate.js"); /** @internal */ const DecodeExceptionTypeId = exports.DecodeExceptionTypeId = /*#__PURE__*/Symbol.for("effect/Encoding/errors/Decode"); /** @internal */ const DecodeException = (input, message) => { const out = { _tag: "DecodeException", [DecodeExceptionTypeId]: DecodeExceptionTypeId, input }; if ((0, _Predicate.isString)(message)) { out.message = message; } return out; }; /** @internal */ exports.DecodeException = DecodeException; const isDecodeException = u => (0, _Predicate.hasProperty)(u, DecodeExceptionTypeId); /** @interal */ exports.isDecodeException = isDecodeException; const encoder = exports.encoder = /*#__PURE__*/new TextEncoder(); /** @interal */ const decoder = exports.decoder = /*#__PURE__*/new TextDecoder(); //# sourceMappingURL=common.js.map