UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

25 lines (24 loc) 535 B
import { struct as c } from "../../../utils/struct/main.js"; import { enumerable as t, getter as s } from "../../../utils/struct/property.js"; const e = /* @__PURE__ */ Symbol("<<NO_ERR>>"); function _(r) { if (r === e) throw new TypeError("Illegal error"); } const l = () => { let r = e; const n = () => { r = e; }, E = (o) => { _(o), r = o; }; return c({ error: s(() => r === e ? void 0 : r), hasError: s(() => r !== e), reset: t(n), set: t(E) }); }; export { l as createErrorContainer };