mobx 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/core/computedvalue.d.ts +1 -1
- package/lib/mobx.d.ts +102 -134
- package/lib/mobx.js +28 -28
- package/lib/mobx.min.js +1 -1
- package/lib/mobx.min.js.map +1 -1
- package/lib/mobx.module.js +28 -28
- package/lib/mobx.umd.js +28 -28
- package/lib/mobx.umd.min.js +1 -1
- package/lib/mobx.umd.min.js.map +1 -1
- package/lib/utils/utils.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
|
|
2
|
+
# 3.6.2
|
|
3
|
+
|
|
4
|
+
* Fixed accidental dependency on the `node` typings. Fixes [#1387](https://github.com/mobxjs/mobx/issues/1387) / [#1362](https://github.com/mobxjs/mobx/issues/1387)
|
|
5
|
+
|
|
2
6
|
# 3.6.1
|
|
3
7
|
|
|
4
8
|
* Fixed [#1358](https://github.com/mobxjs/mobx/pull/1359): Deep comparison failing on IE11. By [le0nik](https://github.com/le0nik) through [#1359](https://github.com/mobxjs/mobx/pull/1359)
|
|
@@ -79,4 +79,4 @@ export declare class ComputedValue<T> implements IObservable, IComputedValue<T>,
|
|
|
79
79
|
valueOf(): T;
|
|
80
80
|
whyRun(): string;
|
|
81
81
|
}
|
|
82
|
-
export declare const isComputedValue: (x: any) => x is ComputedValue<
|
|
82
|
+
export declare const isComputedValue: (x: any) => x is ComputedValue<{}>;
|
package/lib/mobx.d.ts
CHANGED
|
@@ -48,84 +48,90 @@ export { whyRun, trace } from "./api/whyrun";
|
|
|
48
48
|
export { Lambda, isArrayLike } from "./utils/utils";
|
|
49
49
|
export { Iterator } from "./utils/iterable";
|
|
50
50
|
export { IObserverTree, IDependencyTree } from "./api/extras";
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
51
|
+
import { resetGlobalState, shareGlobalState, getGlobalState, isolateGlobalState } from "./core/globalstate";
|
|
52
|
+
import { getDependencyTree, getObserverTree } from "./api/extras";
|
|
53
|
+
import { getDebugName, getAtom, getAdministration } from "./types/type-utils";
|
|
54
|
+
import { allowStateChanges } from "./core/action";
|
|
55
|
+
import { spyReport, spyReportEnd, spyReportStart, isSpyEnabled } from "./core/spy";
|
|
56
|
+
import { deepEqual } from "./utils/eq";
|
|
57
|
+
import { isComputingDerivation } from "./core/derivation";
|
|
58
|
+
import { setReactionScheduler, onReactionError } from "./core/reaction";
|
|
59
|
+
import { reserveArrayBuffer } from "./types/observablearray";
|
|
60
|
+
import { interceptReads } from "./api/intercept-read";
|
|
56
61
|
import { ObservableMap } from "./types/observablemap";
|
|
57
62
|
import { IObservableValue } from "./types/observablevalue";
|
|
58
63
|
export declare const extras: {
|
|
59
|
-
allowStateChanges:
|
|
60
|
-
deepEqual:
|
|
61
|
-
getAtom:
|
|
62
|
-
getDebugName:
|
|
63
|
-
getDependencyTree:
|
|
64
|
-
getAdministration:
|
|
65
|
-
getGlobalState:
|
|
66
|
-
getObserverTree:
|
|
67
|
-
interceptReads:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
shareGlobalState: () => void;
|
|
80
|
-
spyReport: (event: any) => void;
|
|
81
|
-
spyReportEnd: (change?: any) => void;
|
|
82
|
-
spyReportStart: (event: any) => void;
|
|
83
|
-
setReactionScheduler: (fn: (f: () => void) => void) => void;
|
|
64
|
+
allowStateChanges: typeof allowStateChanges;
|
|
65
|
+
deepEqual: typeof deepEqual;
|
|
66
|
+
getAtom: typeof getAtom;
|
|
67
|
+
getDebugName: typeof getDebugName;
|
|
68
|
+
getDependencyTree: typeof getDependencyTree;
|
|
69
|
+
getAdministration: typeof getAdministration;
|
|
70
|
+
getGlobalState: typeof getGlobalState;
|
|
71
|
+
getObserverTree: typeof getObserverTree;
|
|
72
|
+
interceptReads: typeof interceptReads;
|
|
73
|
+
isComputingDerivation: typeof isComputingDerivation;
|
|
74
|
+
isSpyEnabled: typeof isSpyEnabled;
|
|
75
|
+
onReactionError: typeof onReactionError;
|
|
76
|
+
reserveArrayBuffer: typeof reserveArrayBuffer;
|
|
77
|
+
resetGlobalState: typeof resetGlobalState;
|
|
78
|
+
isolateGlobalState: typeof isolateGlobalState;
|
|
79
|
+
shareGlobalState: typeof shareGlobalState;
|
|
80
|
+
spyReport: typeof spyReport;
|
|
81
|
+
spyReportEnd: typeof spyReportEnd;
|
|
82
|
+
spyReportStart: typeof spyReportStart;
|
|
83
|
+
setReactionScheduler: typeof setReactionScheduler;
|
|
84
84
|
};
|
|
85
|
-
import { Reaction
|
|
85
|
+
import { Reaction } from "./core/reaction";
|
|
86
|
+
import { untracked } from "./core/derivation";
|
|
86
87
|
import { Atom, BaseAtom } from "./core/atom";
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
88
|
+
import { useStrict, isStrictModeEnabled } from "./core/action";
|
|
89
|
+
import { spy } from "./core/spy";
|
|
90
|
+
import { asReference, asFlat, asStructure, asMap } from "./types/modifiers-old";
|
|
91
|
+
import { isModifierDescriptor } from "./types/modifiers";
|
|
92
|
+
import { isObservableObject } from "./types/observableobject";
|
|
93
|
+
import { isObservableArray } from "./types/observablearray";
|
|
94
|
+
import { map } from "./types/observablemap";
|
|
95
|
+
import { transaction } from "./api/transaction";
|
|
94
96
|
import { IObservableFactory, IObservableFactories } from "./api/observable";
|
|
95
97
|
import { IComputed } from "./api/computed";
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
98
|
+
import { isObservable } from "./api/isobservable";
|
|
99
|
+
import { isComputed } from "./api/iscomputed";
|
|
100
|
+
import { extendObservable, extendShallowObservable } from "./api/extendobservable";
|
|
101
|
+
import { observe } from "./api/observe";
|
|
102
|
+
import { intercept } from "./api/intercept";
|
|
103
|
+
import { autorun, autorunAsync, when, reaction } from "./api/autorun";
|
|
104
|
+
import { isAction, runInAction, IActionFactory } from "./api/action";
|
|
105
|
+
import { expr } from "./api/expr";
|
|
106
|
+
import { toJS } from "./api/tojs";
|
|
107
|
+
import { createTransformer } from "./api/createtransformer";
|
|
108
|
+
import { whyRun } from "./api/whyrun";
|
|
109
|
+
import { isArrayLike } from "./utils/utils";
|
|
99
110
|
declare const everything: {
|
|
100
111
|
Reaction: typeof Reaction;
|
|
101
|
-
untracked:
|
|
112
|
+
untracked: typeof untracked;
|
|
102
113
|
Atom: typeof Atom;
|
|
103
114
|
BaseAtom: typeof BaseAtom;
|
|
104
|
-
useStrict:
|
|
105
|
-
isStrictModeEnabled:
|
|
106
|
-
spy:
|
|
115
|
+
useStrict: typeof useStrict;
|
|
116
|
+
isStrictModeEnabled: typeof isStrictModeEnabled;
|
|
117
|
+
spy: typeof spy;
|
|
107
118
|
comparer: {
|
|
108
119
|
identity: (a: any, b: any) => boolean;
|
|
109
120
|
structural: (a: any, b: any) => boolean;
|
|
110
121
|
default: (a: any, b: any) => boolean;
|
|
111
122
|
};
|
|
112
|
-
asReference:
|
|
113
|
-
asFlat:
|
|
114
|
-
asStructure:
|
|
115
|
-
asMap:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<T>(entries: [string, T][]): ObservableMap<T>;
|
|
119
|
-
<T>(data: IKeyValueMap<T>): ObservableMap<T>;
|
|
120
|
-
};
|
|
121
|
-
isModifierDescriptor: (thing: any) => thing is IModifierDescriptor<any>;
|
|
122
|
-
isObservableObject: (thing: any) => thing is IObservableObject;
|
|
123
|
+
asReference: typeof asReference;
|
|
124
|
+
asFlat: typeof asFlat;
|
|
125
|
+
asStructure: typeof asStructure;
|
|
126
|
+
asMap: typeof asMap;
|
|
127
|
+
isModifierDescriptor: typeof isModifierDescriptor;
|
|
128
|
+
isObservableObject: typeof isObservableObject;
|
|
123
129
|
isBoxedObservable: (x: any) => x is IObservableValue<any>;
|
|
124
|
-
isObservableArray:
|
|
130
|
+
isObservableArray: typeof isObservableArray;
|
|
125
131
|
ObservableMap: typeof ObservableMap;
|
|
126
132
|
isObservableMap: (thing: any) => thing is ObservableMap<any>;
|
|
127
|
-
map:
|
|
128
|
-
transaction:
|
|
133
|
+
map: typeof map;
|
|
134
|
+
transaction: typeof transaction;
|
|
129
135
|
observable: IObservableFactory & IObservableFactories & {
|
|
130
136
|
deep: {
|
|
131
137
|
struct<T>(initialValue?: T | undefined): T;
|
|
@@ -135,83 +141,45 @@ declare const everything: {
|
|
|
135
141
|
};
|
|
136
142
|
};
|
|
137
143
|
computed: IComputed;
|
|
138
|
-
isObservable:
|
|
139
|
-
isComputed:
|
|
140
|
-
extendObservable:
|
|
141
|
-
extendShallowObservable:
|
|
142
|
-
observe:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
(object: Object, property: string, listener: (change: IValueDidChange<any>) => void, fireImmediately?: boolean | undefined): Lambda;
|
|
149
|
-
};
|
|
150
|
-
intercept: {
|
|
151
|
-
<T>(value: IObservableValue<T>, handler: IInterceptor<IValueWillChange<T>>): Lambda;
|
|
152
|
-
<T>(observableArray: IObservableArray<T>, handler: IInterceptor<IArrayWillChange<T> | IArrayWillSplice<T>>): Lambda;
|
|
153
|
-
<T>(observableMap: ObservableMap<T>, handler: IInterceptor<IMapWillChange<T>>): Lambda;
|
|
154
|
-
<T>(observableMap: ObservableMap<T>, property: string, handler: IInterceptor<IValueWillChange<T>>): Lambda;
|
|
155
|
-
(object: Object, handler: IInterceptor<IObjectWillChange>): Lambda;
|
|
156
|
-
<T extends Object, K extends keyof T>(object: T, property: K, handler: IInterceptor<IValueWillChange<any>>): Lambda;
|
|
157
|
-
};
|
|
158
|
-
autorun: {
|
|
159
|
-
(view: (r: IReactionPublic) => any, scope?: any): IReactionDisposer;
|
|
160
|
-
(name: string, view: (r: IReactionPublic) => any, scope?: any): IReactionDisposer;
|
|
161
|
-
};
|
|
162
|
-
autorunAsync: {
|
|
163
|
-
(name: string, func: (r: IReactionPublic) => any, delay?: number | undefined, scope?: any): IReactionDisposer;
|
|
164
|
-
(func: (r: IReactionPublic) => any, delay?: number | undefined, scope?: any): IReactionDisposer;
|
|
165
|
-
};
|
|
166
|
-
when: {
|
|
167
|
-
(name: string, predicate: () => boolean, effect: Lambda, scope?: any): IReactionDisposer;
|
|
168
|
-
(predicate: () => boolean, effect: Lambda, scope?: any): IReactionDisposer;
|
|
169
|
-
};
|
|
170
|
-
reaction: {
|
|
171
|
-
<T>(expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, opts?: IReactionOptions | undefined): IReactionDisposer;
|
|
172
|
-
<T>(expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, fireImmediately?: boolean | undefined): IReactionDisposer;
|
|
173
|
-
};
|
|
144
|
+
isObservable: typeof isObservable;
|
|
145
|
+
isComputed: typeof isComputed;
|
|
146
|
+
extendObservable: typeof extendObservable;
|
|
147
|
+
extendShallowObservable: typeof extendShallowObservable;
|
|
148
|
+
observe: typeof observe;
|
|
149
|
+
intercept: typeof intercept;
|
|
150
|
+
autorun: typeof autorun;
|
|
151
|
+
autorunAsync: typeof autorunAsync;
|
|
152
|
+
when: typeof when;
|
|
153
|
+
reaction: typeof reaction;
|
|
174
154
|
action: IActionFactory;
|
|
175
|
-
isAction:
|
|
176
|
-
runInAction:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
<T>(source: T, detectCycles?: boolean | undefined): T;
|
|
183
|
-
(source: any, detectCycles?: boolean | undefined): any;
|
|
184
|
-
(source: any, detectCycles: boolean, __alreadySeen: [any, any][]): any;
|
|
185
|
-
};
|
|
186
|
-
createTransformer: <A, B>(transformer: ITransformer<A, B>, onCleanup?: ((resultObject: B | undefined, sourceObject?: A | undefined) => void) | undefined) => ITransformer<A, B>;
|
|
187
|
-
whyRun: (thing?: any, prop?: string | undefined) => string;
|
|
188
|
-
isArrayLike: (x: any) => x is any[] | IObservableArray<any>;
|
|
155
|
+
isAction: typeof isAction;
|
|
156
|
+
runInAction: typeof runInAction;
|
|
157
|
+
expr: typeof expr;
|
|
158
|
+
toJS: typeof toJS;
|
|
159
|
+
createTransformer: typeof createTransformer;
|
|
160
|
+
whyRun: typeof whyRun;
|
|
161
|
+
isArrayLike: typeof isArrayLike;
|
|
189
162
|
extras: {
|
|
190
|
-
allowStateChanges:
|
|
191
|
-
deepEqual:
|
|
192
|
-
getAtom:
|
|
193
|
-
getDebugName:
|
|
194
|
-
getDependencyTree:
|
|
195
|
-
getAdministration:
|
|
196
|
-
getGlobalState:
|
|
197
|
-
getObserverTree:
|
|
198
|
-
interceptReads:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
shareGlobalState: () => void;
|
|
211
|
-
spyReport: (event: any) => void;
|
|
212
|
-
spyReportEnd: (change?: any) => void;
|
|
213
|
-
spyReportStart: (event: any) => void;
|
|
214
|
-
setReactionScheduler: (fn: (f: () => void) => void) => void;
|
|
163
|
+
allowStateChanges: typeof allowStateChanges;
|
|
164
|
+
deepEqual: typeof deepEqual;
|
|
165
|
+
getAtom: typeof getAtom;
|
|
166
|
+
getDebugName: typeof getDebugName;
|
|
167
|
+
getDependencyTree: typeof getDependencyTree;
|
|
168
|
+
getAdministration: typeof getAdministration;
|
|
169
|
+
getGlobalState: typeof getGlobalState;
|
|
170
|
+
getObserverTree: typeof getObserverTree;
|
|
171
|
+
interceptReads: typeof interceptReads;
|
|
172
|
+
isComputingDerivation: typeof isComputingDerivation;
|
|
173
|
+
isSpyEnabled: typeof isSpyEnabled;
|
|
174
|
+
onReactionError: typeof onReactionError;
|
|
175
|
+
reserveArrayBuffer: typeof reserveArrayBuffer;
|
|
176
|
+
resetGlobalState: typeof resetGlobalState;
|
|
177
|
+
isolateGlobalState: typeof isolateGlobalState;
|
|
178
|
+
shareGlobalState: typeof shareGlobalState;
|
|
179
|
+
spyReport: typeof spyReport;
|
|
180
|
+
spyReportEnd: typeof spyReportEnd;
|
|
181
|
+
spyReportStart: typeof spyReportStart;
|
|
182
|
+
setReactionScheduler: typeof setReactionScheduler;
|
|
215
183
|
};
|
|
216
184
|
};
|
|
217
185
|
export default everything;
|
package/lib/mobx.js
CHANGED
|
@@ -35,7 +35,7 @@ function __extends(d, b) {
|
|
|
35
35
|
* 1) detect when they are being _used_ and report this (using reportObserved). This allows mobx to make the connection between running functions and the data they used
|
|
36
36
|
* 2) they should notify mobx whenever they have _changed_. This way mobx can re-run any functions (derivations) that are using this atom.
|
|
37
37
|
*/
|
|
38
|
-
var BaseAtom = (function () {
|
|
38
|
+
var BaseAtom = /** @class */ (function () {
|
|
39
39
|
/**
|
|
40
40
|
* Create a new atom. For debugging purposes it is recommended to give it a name.
|
|
41
41
|
* The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.
|
|
@@ -72,7 +72,7 @@ var BaseAtom = (function () {
|
|
|
72
72
|
};
|
|
73
73
|
return BaseAtom;
|
|
74
74
|
}());
|
|
75
|
-
var Atom = (function (_super) {
|
|
75
|
+
var Atom = /** @class */ (function (_super) {
|
|
76
76
|
__extends(Atom, _super);
|
|
77
77
|
/**
|
|
78
78
|
* Create a new atom. For debugging purposes it is recommended to give it a name.
|
|
@@ -238,7 +238,7 @@ var safariPrototypeSetterInheritanceBug = (function () {
|
|
|
238
238
|
*/
|
|
239
239
|
var OBSERVABLE_ARRAY_BUFFER_SIZE = 0;
|
|
240
240
|
// Typescript workaround to make sure ObservableArray extends Array
|
|
241
|
-
var StubArray = (function () {
|
|
241
|
+
var StubArray = /** @class */ (function () {
|
|
242
242
|
function StubArray() {
|
|
243
243
|
}
|
|
244
244
|
return StubArray;
|
|
@@ -281,7 +281,7 @@ if (Object.isFrozen(Array)) {
|
|
|
281
281
|
});
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
|
-
var ObservableArrayAdministration = (function () {
|
|
284
|
+
var ObservableArrayAdministration = /** @class */ (function () {
|
|
285
285
|
function ObservableArrayAdministration(name, enhancer, array, owned) {
|
|
286
286
|
this.array = array;
|
|
287
287
|
this.owned = owned;
|
|
@@ -444,7 +444,7 @@ var ObservableArrayAdministration = (function () {
|
|
|
444
444
|
};
|
|
445
445
|
return ObservableArrayAdministration;
|
|
446
446
|
}());
|
|
447
|
-
var ObservableArray = (function (_super) {
|
|
447
|
+
var ObservableArray = /** @class */ (function (_super) {
|
|
448
448
|
__extends(ObservableArray, _super);
|
|
449
449
|
function ObservableArray(initialValues, enhancer, name, owned) {
|
|
450
450
|
if (name === void 0) { name = "ObservableArray@" + getNextId(); }
|
|
@@ -757,7 +757,7 @@ function isObservableArray(thing) {
|
|
|
757
757
|
}
|
|
758
758
|
|
|
759
759
|
var UNCHANGED = {};
|
|
760
|
-
var ObservableValue = (function (_super) {
|
|
760
|
+
var ObservableValue = /** @class */ (function (_super) {
|
|
761
761
|
__extends(ObservableValue, _super);
|
|
762
762
|
function ObservableValue(value, enhancer, name, notifySpy) {
|
|
763
763
|
if (name === void 0) { name = "ObservableValue@" + getNextId(); }
|
|
@@ -998,18 +998,18 @@ function allowStateChangesEnd(prev) {
|
|
|
998
998
|
* This means that these properties despite being enumerable might not show up in Object.keys() (but they will show up in for...in loops).
|
|
999
999
|
*/
|
|
1000
1000
|
function createClassPropertyDecorator(
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* This function is invoked once, when the property is added to a new instance.
|
|
1003
|
+
* When this happens is not strictly determined due to differences in TS and Babel:
|
|
1004
|
+
* Typescript: Usually when constructing the new instance
|
|
1005
|
+
* Babel, sometimes Typescript: during the first get / set
|
|
1006
|
+
* Both: when calling `runLazyInitializers(instance)`
|
|
1007
|
+
*/
|
|
1008
|
+
onInitialize, get, set, enumerable,
|
|
1009
|
+
/**
|
|
1010
|
+
* Can this decorator invoked with arguments? e.g. @decorator(args)
|
|
1011
|
+
*/
|
|
1012
|
+
allowCustomArguments) {
|
|
1013
1013
|
function classPropertyDecorator(target, key, descriptor, customArgs, argLen) {
|
|
1014
1014
|
if (argLen === void 0) { argLen = 0; }
|
|
1015
1015
|
invariant(allowCustomArguments || quacksLikeADecorator(arguments), "This function is a decorator, but it wasn't invoked like a decorator");
|
|
@@ -1171,10 +1171,11 @@ function defineBoundAction(target, propertyName, fn) {
|
|
|
1171
1171
|
addHiddenProp(target, propertyName, res);
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
|
-
|
|
1174
|
+
var toString = Object.prototype.toString;
|
|
1175
1175
|
function deepEqual(a, b) {
|
|
1176
1176
|
return eq(a, b);
|
|
1177
1177
|
}
|
|
1178
|
+
// Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289
|
|
1178
1179
|
// Internal recursive comparison function for `isEqual`.
|
|
1179
1180
|
function eq(a, b, aStack, bStack) {
|
|
1180
1181
|
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
|
@@ -1193,7 +1194,6 @@ function eq(a, b, aStack, bStack) {
|
|
|
1193
1194
|
return false;
|
|
1194
1195
|
return deepEq(a, b, aStack, bStack);
|
|
1195
1196
|
}
|
|
1196
|
-
var toString = Object.prototype.toString;
|
|
1197
1197
|
// Internal recursive comparison function for `isEqual`.
|
|
1198
1198
|
function deepEq(a, b, aStack, bStack) {
|
|
1199
1199
|
// Unwrap any wrapped objects.
|
|
@@ -1484,7 +1484,7 @@ function reaction(expression, effect, arg3) {
|
|
|
1484
1484
|
*
|
|
1485
1485
|
* If at any point it's outside batch and it isn't observed: reset everything and go to 1.
|
|
1486
1486
|
*/
|
|
1487
|
-
var ComputedValue = (function () {
|
|
1487
|
+
var ComputedValue = /** @class */ (function () {
|
|
1488
1488
|
/**
|
|
1489
1489
|
* Create a new computed value based on a function expression.
|
|
1490
1490
|
*
|
|
@@ -1666,7 +1666,7 @@ var ComputedValue = (function () {
|
|
|
1666
1666
|
ComputedValue.prototype[primitiveSymbol()] = ComputedValue.prototype.valueOf;
|
|
1667
1667
|
var isComputedValue = createInstanceofPredicate("ComputedValue", ComputedValue);
|
|
1668
1668
|
|
|
1669
|
-
var ObservableObjectAdministration = (function () {
|
|
1669
|
+
var ObservableObjectAdministration = /** @class */ (function () {
|
|
1670
1670
|
function ObservableObjectAdministration(target, name) {
|
|
1671
1671
|
this.target = target;
|
|
1672
1672
|
this.name = name;
|
|
@@ -2166,7 +2166,7 @@ function transaction(action, thisArg) {
|
|
|
2166
2166
|
}
|
|
2167
2167
|
|
|
2168
2168
|
var ObservableMapMarker = {};
|
|
2169
|
-
var ObservableMap = (function () {
|
|
2169
|
+
var ObservableMap = /** @class */ (function () {
|
|
2170
2170
|
function ObservableMap(initialData, enhancer, name) {
|
|
2171
2171
|
if (enhancer === void 0) { enhancer = deepEnhancer; }
|
|
2172
2172
|
if (name === void 0) { name = "ObservableMap@" + getNextId(); }
|
|
@@ -2615,7 +2615,7 @@ function toPrimitive(value) {
|
|
|
2615
2615
|
* These values will persist if global state is reset
|
|
2616
2616
|
*/
|
|
2617
2617
|
var persistentKeys = ["mobxGuid", "resetId", "spyListeners", "strictMode", "runId"];
|
|
2618
|
-
var MobXGlobals = (function () {
|
|
2618
|
+
var MobXGlobals = /** @class */ (function () {
|
|
2619
2619
|
function MobXGlobals() {
|
|
2620
2620
|
/**
|
|
2621
2621
|
* MobXGlobals version.
|
|
@@ -2699,7 +2699,7 @@ var warnedAboutMultipleInstances = false;
|
|
|
2699
2699
|
warnedAboutMultipleInstances = true;
|
|
2700
2700
|
console.warn("[mobx] Warning: there are multiple mobx instances active. This might lead to unexpected results. See https://github.com/mobxjs/mobx/issues/1082 for details.");
|
|
2701
2701
|
}
|
|
2702
|
-
});
|
|
2702
|
+
}, 1);
|
|
2703
2703
|
}
|
|
2704
2704
|
}
|
|
2705
2705
|
function isolateGlobalState() {
|
|
@@ -3036,7 +3036,7 @@ var TraceMode;
|
|
|
3036
3036
|
TraceMode[TraceMode["LOG"] = 1] = "LOG";
|
|
3037
3037
|
TraceMode[TraceMode["BREAK"] = 2] = "BREAK";
|
|
3038
3038
|
})(TraceMode || (TraceMode = {}));
|
|
3039
|
-
var CaughtException = (function () {
|
|
3039
|
+
var CaughtException = /** @class */ (function () {
|
|
3040
3040
|
function CaughtException(cause) {
|
|
3041
3041
|
this.cause = cause;
|
|
3042
3042
|
// Empty
|
|
@@ -3265,7 +3265,7 @@ function getAtomFromArgs(args) {
|
|
|
3265
3265
|
}
|
|
3266
3266
|
}
|
|
3267
3267
|
|
|
3268
|
-
var Reaction = (function () {
|
|
3268
|
+
var Reaction = /** @class */ (function () {
|
|
3269
3269
|
function Reaction(name, onInvalidate) {
|
|
3270
3270
|
if (name === void 0) { name = "Reaction@" + getNextId(); }
|
|
3271
3271
|
this.name = name;
|
|
@@ -3618,7 +3618,7 @@ function createTransformer(transformer, onCleanup) {
|
|
|
3618
3618
|
// This construction is used to avoid leaking refs to the objectCache directly
|
|
3619
3619
|
var resetId = globalState.resetId;
|
|
3620
3620
|
// Local transformer class specifically for this transformer
|
|
3621
|
-
var Transformer = (function (_super) {
|
|
3621
|
+
var Transformer = /** @class */ (function (_super) {
|
|
3622
3622
|
__extends(Transformer, _super);
|
|
3623
3623
|
function Transformer(sourceIdentifier, sourceObject) {
|
|
3624
3624
|
var _this = _super.call(this, function () { return transformer(sourceObject); }, undefined, comparer.default, "Transformer-" + transformer.name + "-" + sourceIdentifier, undefined) || this;
|