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
22 lines • 699 B
JavaScript
import { hasProperty, isString } from "../../Predicate.js";
/** @internal */
export const DecodeExceptionTypeId = /*#__PURE__*/Symbol.for("effect/Encoding/errors/Decode");
/** @internal */
export const DecodeException = (input, message) => {
const out = {
_tag: "DecodeException",
[DecodeExceptionTypeId]: DecodeExceptionTypeId,
input
};
if (isString(message)) {
out.message = message;
}
return out;
};
/** @internal */
export const isDecodeException = u => hasProperty(u, DecodeExceptionTypeId);
/** @interal */
export const encoder = /*#__PURE__*/new TextEncoder();
/** @interal */
export const decoder = /*#__PURE__*/new TextDecoder();
//# sourceMappingURL=common.js.map