mobx 6.3.1 → 6.3.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 +6 -0
- package/dist/mobx.cjs.development.js +12 -9
- 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 +12 -9
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +12 -9
- 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 +12 -9
- 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/types/autoannotation.ts +2 -1
package/dist/mobx.esm.js
CHANGED
|
@@ -866,7 +866,7 @@ function createAutoAnnotation(options) {
|
|
|
866
866
|
}
|
|
867
867
|
|
|
868
868
|
function make_$5(adm, key, descriptor, source) {
|
|
869
|
-
var _this$
|
|
869
|
+
var _this$options_3, _this$options_4;
|
|
870
870
|
|
|
871
871
|
// getter -> computed
|
|
872
872
|
if (descriptor.get) {
|
|
@@ -901,22 +901,25 @@ function make_$5(adm, key, descriptor, source) {
|
|
|
901
901
|
|
|
902
902
|
|
|
903
903
|
if (source !== adm.target_ && typeof descriptor.value === "function") {
|
|
904
|
-
var _this$
|
|
904
|
+
var _this$options_2;
|
|
905
905
|
|
|
906
906
|
if (isGenerator(descriptor.value)) {
|
|
907
|
-
|
|
907
|
+
var _this$options_;
|
|
908
|
+
|
|
909
|
+
var flowAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? flow.bound : flow;
|
|
910
|
+
return flowAnnotation.make_(adm, key, descriptor, source);
|
|
908
911
|
}
|
|
909
912
|
|
|
910
|
-
var actionAnnotation = ((_this$
|
|
913
|
+
var actionAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.autoBind) ? autoAction.bound : autoAction;
|
|
911
914
|
return actionAnnotation.make_(adm, key, descriptor, source);
|
|
912
915
|
} // other -> observable
|
|
913
916
|
// Copy props from proto as well, see test:
|
|
914
917
|
// "decorate should work with Object.create"
|
|
915
918
|
|
|
916
919
|
|
|
917
|
-
var observableAnnotation = ((_this$
|
|
920
|
+
var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; // if function respect autoBind option
|
|
918
921
|
|
|
919
|
-
if (typeof descriptor.value === "function" && ((_this$
|
|
922
|
+
if (typeof descriptor.value === "function" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {
|
|
920
923
|
var _adm$proxy_;
|
|
921
924
|
|
|
922
925
|
descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);
|
|
@@ -926,7 +929,7 @@ function make_$5(adm, key, descriptor, source) {
|
|
|
926
929
|
}
|
|
927
930
|
|
|
928
931
|
function extend_$5(adm, key, descriptor, proxyTrap) {
|
|
929
|
-
var _this$
|
|
932
|
+
var _this$options_5, _this$options_6;
|
|
930
933
|
|
|
931
934
|
// getter -> computed
|
|
932
935
|
if (descriptor.get) {
|
|
@@ -944,13 +947,13 @@ function extend_$5(adm, key, descriptor, proxyTrap) {
|
|
|
944
947
|
// if function respect autoBind option
|
|
945
948
|
|
|
946
949
|
|
|
947
|
-
if (typeof descriptor.value === "function" && ((_this$
|
|
950
|
+
if (typeof descriptor.value === "function" && ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.autoBind)) {
|
|
948
951
|
var _adm$proxy_2;
|
|
949
952
|
|
|
950
953
|
descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);
|
|
951
954
|
}
|
|
952
955
|
|
|
953
|
-
var observableAnnotation = ((_this$
|
|
956
|
+
var observableAnnotation = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable;
|
|
954
957
|
return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);
|
|
955
958
|
}
|
|
956
959
|
|