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)

27 lines (26 loc) 575 B
import { struct as E } from "../../../utils/struct/main.js"; import { enumerable as o, getter as s } from "../../../utils/struct/property.js"; const e = Symbol("<<NO_ERR>>"); function c(r) { /* istanbul ignore if -- @preserve */ if (r === e) throw new TypeError("Illegal error"); } const i = () => { let r = e; const n = () => { r = e; }, a = (t) => { c(t), r = t; }; return E({ error: s(() => r === e ? void 0 : r), hasError: s(() => r !== e), reset: o(n), set: o(a) }); }; export { i as createErrorContainer, i as default };