1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | import { die } from "./errors"
|
19 | import { getGlobal } from "./utils/global"
|
20 | ;["Symbol", "Map", "Set"].forEach(m => {
|
21 | let g = getGlobal()
|
22 | if (typeof g[m] === "undefined") {
|
23 | die(`MobX requires global '${m}' to be available or polyfilled`)
|
24 | }
|
25 | })
|
26 |
|
27 | import { spy, getDebugName, $mobx } from "./internal"
|
28 |
|
29 | export {
|
30 | IObservable,
|
31 | IDepTreeNode,
|
32 | Reaction,
|
33 | IReactionPublic,
|
34 | IReactionDisposer,
|
35 | untracked,
|
36 | IAtom,
|
37 | createAtom,
|
38 | spy,
|
39 | IComputedValue,
|
40 | IEqualsComparer,
|
41 | comparer,
|
42 | IEnhancer,
|
43 | IInterceptable,
|
44 | IInterceptor,
|
45 | IListenable,
|
46 | IObjectWillChange,
|
47 | IObjectDidChange,
|
48 | isObservableObject,
|
49 | IValueDidChange,
|
50 | IValueWillChange,
|
51 | IObservableValue,
|
52 | isObservableValue as isBoxedObservable,
|
53 | IObservableArray,
|
54 | IArrayWillChange,
|
55 | IArrayWillSplice,
|
56 | IArraySplice,
|
57 | IArrayUpdate,
|
58 | IArrayDidChange,
|
59 | isObservableArray,
|
60 | IKeyValueMap,
|
61 | ObservableMap,
|
62 | IMapEntries,
|
63 | IMapEntry,
|
64 | IMapWillChange,
|
65 | IMapDidChange,
|
66 | isObservableMap,
|
67 | IObservableMapInitialValues,
|
68 | ObservableSet,
|
69 | isObservableSet,
|
70 | ISetDidChange,
|
71 | ISetWillChange,
|
72 | IObservableSetInitialValues,
|
73 | transaction,
|
74 | observable,
|
75 | IObservableFactory,
|
76 | CreateObservableOptions,
|
77 | computed,
|
78 | IComputedFactory,
|
79 | isObservable,
|
80 | isObservableProp,
|
81 | isComputed,
|
82 | isComputedProp,
|
83 | extendObservable,
|
84 | observe,
|
85 | intercept,
|
86 | autorun,
|
87 | IAutorunOptions,
|
88 | reaction,
|
89 | IReactionOptions,
|
90 | when,
|
91 | IWhenOptions,
|
92 | action,
|
93 | isAction,
|
94 | runInAction,
|
95 | IActionFactory,
|
96 | keys,
|
97 | values,
|
98 | entries,
|
99 | set,
|
100 | remove,
|
101 | has,
|
102 | get,
|
103 | apiOwnKeys as ownKeys,
|
104 | apiDefineProperty as defineProperty,
|
105 | configure,
|
106 | onBecomeObserved,
|
107 | onBecomeUnobserved,
|
108 | flow,
|
109 | isFlow,
|
110 | flowResult,
|
111 | FlowCancellationError,
|
112 | isFlowCancellationError,
|
113 | toJS,
|
114 | trace,
|
115 | IObserverTree,
|
116 | IDependencyTree,
|
117 | getDependencyTree,
|
118 | getObserverTree,
|
119 | resetGlobalState as _resetGlobalState,
|
120 | getGlobalState as _getGlobalState,
|
121 | getDebugName,
|
122 | getAtom,
|
123 | getAdministration as _getAdministration,
|
124 | allowStateChanges as _allowStateChanges,
|
125 | runInAction as _allowStateChangesInsideComputed,
|
126 | Lambda,
|
127 | $mobx,
|
128 | isComputingDerivation as _isComputingDerivation,
|
129 | onReactionError,
|
130 | interceptReads as _interceptReads,
|
131 | IComputedValueOptions,
|
132 | IActionRunInfo,
|
133 | _startAction,
|
134 | _endAction,
|
135 | allowStateReadsStart as _allowStateReadsStart,
|
136 | allowStateReadsEnd as _allowStateReadsEnd,
|
137 | makeObservable,
|
138 | makeAutoObservable,
|
139 | autoAction as _autoAction,
|
140 | AnnotationsMap,
|
141 | AnnotationMapEntry,
|
142 | override
|
143 | } from "./internal"
|
144 |
|
145 |
|
146 | declare const __MOBX_DEVTOOLS_GLOBAL_HOOK__: { injectMobx: (any) => void }
|
147 | if (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === "object") {
|
148 |
|
149 | __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
|
150 | spy,
|
151 | extras: {
|
152 | getDebugName
|
153 | },
|
154 | $mobx
|
155 | })
|
156 | }
|