mobx 6.3.5 → 6.3.6
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 +8 -0
- package/dist/mobx.cjs.development.js +6 -2
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +6 -2
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +6 -2
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +6 -2
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/package.json +1 -1
- package/src/api/makeObservable.ts +7 -1
- package/src/api/when.ts +1 -1
package/dist/mobx.esm.js
CHANGED
|
@@ -3335,7 +3335,7 @@ function whenPromise(predicate, opts) {
|
|
|
3335
3335
|
|
|
3336
3336
|
cancel = function cancel() {
|
|
3337
3337
|
disposer();
|
|
3338
|
-
reject("WHEN_CANCELLED");
|
|
3338
|
+
reject(new Error("WHEN_CANCELLED"));
|
|
3339
3339
|
};
|
|
3340
3340
|
});
|
|
3341
3341
|
res.cancel = cancel;
|
|
@@ -3466,7 +3466,11 @@ function makeObservable(target, annotations, options) {
|
|
|
3466
3466
|
try {
|
|
3467
3467
|
var _annotations;
|
|
3468
3468
|
|
|
3469
|
-
|
|
3469
|
+
if (process.env.NODE_ENV !== "production" && annotations && target[storedAnnotationsSymbol]) {
|
|
3470
|
+
die("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.");
|
|
3471
|
+
} // Default to decorators
|
|
3472
|
+
|
|
3473
|
+
|
|
3470
3474
|
(_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target); // Annotate
|
|
3471
3475
|
|
|
3472
3476
|
ownKeys(annotations).forEach(function (key) {
|