UNPKG

@dhmk/atom

Version:

Lightweight mobx-like observable values, computed values and side-effects

22 lines (21 loc) 708 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultEffectOptions = exports.defaultAtomOptions = exports.AtomState = exports.Id = void 0; var Id = /** @class */ (function () { function Id() { } return Id; }()); exports.Id = Id; var AtomState; (function (AtomState) { AtomState[AtomState["Actual"] = 0] = "Actual"; AtomState[AtomState["PossiblyStale"] = 1] = "PossiblyStale"; AtomState[AtomState["Stale"] = 2] = "Stale"; })(AtomState = exports.AtomState || (exports.AtomState = {})); exports.defaultAtomOptions = { equals: Object.is, }; exports.defaultEffectOptions = { scheduler: function (fn) { return fn(); }, };