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
package/dist/mobx.esm.js
CHANGED
|
@@ -424,7 +424,7 @@ function assertNotDecorated(prototype, annotation, key) {
|
|
|
424
424
|
var fieldName = prototype.constructor.name + ".prototype." + key.toString();
|
|
425
425
|
var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;
|
|
426
426
|
var requestedAnnotationType = annotation.annotationType_;
|
|
427
|
-
die("Cannot apply '@" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already decorated with '@" + currentAnnotationType + "'.") + "\nRe-decorating fields is not allowed." + "\nUse '@override' decorator for methods
|
|
427
|
+
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.");
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
/**
|
|
@@ -6009,16 +6009,18 @@ function assertAnnotable(adm, annotation, key) {
|
|
|
6009
6009
|
var fieldName = adm.name_ + "." + key.toString();
|
|
6010
6010
|
var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;
|
|
6011
6011
|
var requestedAnnotationType = annotation.annotationType_;
|
|
6012
|
-
die("Cannot apply '" + requestedAnnotationType + "' to '" + fieldName + "':" + ("\nThe field is already annotated with '" + currentAnnotationType + "'.") + "\nRe-annotating fields is not allowed." + "\nUse 'override' annotation for methods
|
|
6012
|
+
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.");
|
|
6013
6013
|
}
|
|
6014
6014
|
}
|
|
6015
6015
|
|
|
6016
|
+
var ENTRY_0 = /*#__PURE__*/createArrayEntryDescriptor(0);
|
|
6016
6017
|
/**
|
|
6017
6018
|
* This array buffer contains two lists of properties, so that all arrays
|
|
6018
6019
|
* can recycle their property definitions, which significantly improves performance of creating
|
|
6019
6020
|
* properties on the fly.
|
|
6020
6021
|
*/
|
|
6021
6022
|
|
|
6023
|
+
|
|
6022
6024
|
var OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array
|
|
6023
6025
|
|
|
6024
6026
|
var StubArray = function StubArray() {};
|
|
@@ -6064,6 +6066,12 @@ var LegacyObservableArray = /*#__PURE__*/function (_StubArray, _Symbol$toStringT
|
|
|
6064
6066
|
allowStateChangesEnd(prev);
|
|
6065
6067
|
}
|
|
6066
6068
|
|
|
6069
|
+
{
|
|
6070
|
+
// Seems that Safari won't use numeric prototype setter untill any * numeric property is
|
|
6071
|
+
// defined on the instance. After that it works fine, even if this property is deleted.
|
|
6072
|
+
Object.defineProperty(_assertThisInitialized(_this), "0", ENTRY_0);
|
|
6073
|
+
}
|
|
6074
|
+
|
|
6067
6075
|
return _this;
|
|
6068
6076
|
}
|
|
6069
6077
|
|