UNPKG

@2toad/reflex

Version:

A simple approach to state management

27 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BackpressureStrategy = exports.COMPUTED_ERRORS = void 0; /** * Error messages for computed reflex operations */ exports.COMPUTED_ERRORS = { SET_VALUE: "Cannot set the value of a computed reactive", ADD_MIDDLEWARE: "Cannot add middleware to a computed reactive", REMOVE_MIDDLEWARE: "Cannot remove middleware from a computed reactive", SYNC_BATCH: "Cannot use sync batch on async computed value", }; /** * Represents strategies for handling backpressure situations */ var BackpressureStrategy; (function (BackpressureStrategy) { /** Discards new values when the system is overwhelmed */ BackpressureStrategy["Drop"] = "drop"; /** Stores values up to a limit for later processing */ BackpressureStrategy["Buffer"] = "buffer"; /** Maintains a fixed-size window of most recent values */ BackpressureStrategy["Sliding"] = "sliding"; /** Throws an error when capacity is exceeded */ BackpressureStrategy["Error"] = "error"; })(BackpressureStrategy || (exports.BackpressureStrategy = BackpressureStrategy = {})); //# sourceMappingURL=types.js.map