mobx 6.6.1 → 6.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 +12 -2
- package/README.md +38 -42
- package/dist/mobx.cjs.development.js +10 -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 +10 -2
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +10 -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 +10 -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/dist/types/observablemap.d.ts +3 -1
- package/package.json +1 -1
- package/src/api/decorators.ts +1 -1
- package/src/types/legacyobservablearray.ts +21 -0
- package/src/types/observablemap.ts +4 -2
- package/src/types/observableobject.ts +1 -1
|
@@ -422,7 +422,7 @@ function assertNotDecorated(prototype, annotation, key) {
|
|
|
422
422
|
var fieldName = prototype.constructor.name + ".prototype." + key.toString();
|
|
423
423
|
var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;
|
|
424
424
|
var requestedAnnotationType = annotation.annotationType_;
|
|
425
|
-
die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods
|
|
425
|
+
die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods overridden by subclass.");
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
/**
|
|
@@ -5983,16 +5983,18 @@ function assertAnnotable(adm, annotation, key) {
|
|
|
5983
5983
|
var fieldName = adm.name_ + "." + key.toString();
|
|
5984
5984
|
var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;
|
|
5985
5985
|
var requestedAnnotationType = annotation.annotationType_;
|
|
5986
|
-
die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods
|
|
5986
|
+
die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods overridden by subclass.");
|
|
5987
5987
|
}
|
|
5988
5988
|
}
|
|
5989
5989
|
|
|
5990
|
+
var ENTRY_0 = /*#__PURE__*/createArrayEntryDescriptor(0);
|
|
5990
5991
|
/**
|
|
5991
5992
|
* This array buffer contains two lists of properties, so that all arrays
|
|
5992
5993
|
* can recycle their property definitions, which significantly improves performance of creating
|
|
5993
5994
|
* properties on the fly.
|
|
5994
5995
|
*/
|
|
5995
5996
|
|
|
5997
|
+
|
|
5996
5998
|
var OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array
|
|
5997
5999
|
|
|
5998
6000
|
var StubArray = function StubArray() {};
|
|
@@ -6038,6 +6040,12 @@ var LegacyObservableArray = /*#__PURE__*/function (_StubArray, _Symbol$toStringT
|
|
|
6038
6040
|
allowStateChangesEnd(prev);
|
|
6039
6041
|
}
|
|
6040
6042
|
|
|
6043
|
+
{
|
|
6044
|
+
// Seems that Safari won't use numeric prototype setter untill any * numeric property is
|
|
6045
|
+
// defined on the instance. After that it works fine, even if this property is deleted.
|
|
6046
|
+
Object.defineProperty(_assertThisInitialized(_this), "0", ENTRY_0);
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6041
6049
|
return _this;
|
|
6042
6050
|
}
|
|
6043
6051
|
|