import { action, computed, makeObservable, observable } from "mobx"; import { hook, mobx } from "./mobx_internal"; import { Model } from "./model"; import { SlicedArray } from "./slices"; Object.assign(mobx, { observable, computed, action }); export const configure = (config: Partial) => { Object.assign(mobx.config, config); } hook(Model, 'construct', ([model]) => { makeObservable(model, { restoreSnapshot: action, }); }); hook(SlicedArray, 'construct', ([slicedArray]) => { makeObservable(slicedArray, { _initialLoadStatus: observable, touchInitialStatus: action, initialLoadState: computed, offerSlice: action, }); });