UNPKG

@react-form-builder/core

Version:

React JSON Schema Form Builder to create complex, validated, reusable forms with no deep React knowledge required

45 lines (44 loc) 1.16 kB
class t { /** * Constructor. * @param error the error. * @param result the result. * @param exceptions the exceptions. * @param warning the warning. */ constructor(r = !1, e, s, n) { this.error = r, this.result = e, this.exceptions = s, this.warning = n; } error; result; exceptions; warning; /** * Creates a new instance of the CalculableResult class with a successful result. * @param result the calculable result. * @returns the new instance of CalculableResult class. */ static success(r) { return new t(!1, r); } /** * Creates a new instance of CalculableResult class with an error. * @param exceptions the exception array. * @returns the new instance of CalculableResult class. */ static error(r) { return new t(!0, void 0, r); } /** * Creates a new instance of the CalculableResult class with a warning result. * @param result the calculable result. * @returns the new instance of CalculableResult class. */ static warning(r) { return new t(!1, r, void 0, !0); } } export { t as CalculableResult }; //# sourceMappingURL=CalculableResult.js.map