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
|
@@ -870,7 +870,7 @@
|
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
function make_$5(adm, key, descriptor, source) {
|
|
873
|
-
var _this$
|
|
873
|
+
var _this$options_3, _this$options_4;
|
|
874
874
|
|
|
875
875
|
// getter -> computed
|
|
876
876
|
if (descriptor.get) {
|
|
@@ -905,22 +905,25 @@
|
|
|
905
905
|
|
|
906
906
|
|
|
907
907
|
if (source !== adm.target_ && typeof descriptor.value === "function") {
|
|
908
|
-
var _this$
|
|
908
|
+
var _this$options_2;
|
|
909
909
|
|
|
910
910
|
if (isGenerator(descriptor.value)) {
|
|
911
|
-
|
|
911
|
+
var _this$options_;
|
|
912
|
+
|
|
913
|
+
var flowAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? flow.bound : flow;
|
|
914
|
+
return flowAnnotation.make_(adm, key, descriptor, source);
|
|
912
915
|
}
|
|
913
916
|
|
|
914
|
-
var actionAnnotation = ((_this$
|
|
917
|
+
var actionAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.autoBind) ? autoAction.bound : autoAction;
|
|
915
918
|
return actionAnnotation.make_(adm, key, descriptor, source);
|
|
916
919
|
} // other -> observable
|
|
917
920
|
// Copy props from proto as well, see test:
|
|
918
921
|
// "decorate should work with Object.create"
|
|
919
922
|
|
|
920
923
|
|
|
921
|
-
var observableAnnotation = ((_this$
|
|
924
|
+
var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; // if function respect autoBind option
|
|
922
925
|
|
|
923
|
-
if (typeof descriptor.value === "function" && ((_this$
|
|
926
|
+
if (typeof descriptor.value === "function" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {
|
|
924
927
|
var _adm$proxy_;
|
|
925
928
|
|
|
926
929
|
descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);
|
|
@@ -930,7 +933,7 @@
|
|
|
930
933
|
}
|
|
931
934
|
|
|
932
935
|
function extend_$5(adm, key, descriptor, proxyTrap) {
|
|
933
|
-
var _this$
|
|
936
|
+
var _this$options_5, _this$options_6;
|
|
934
937
|
|
|
935
938
|
// getter -> computed
|
|
936
939
|
if (descriptor.get) {
|
|
@@ -948,13 +951,13 @@
|
|
|
948
951
|
// if function respect autoBind option
|
|
949
952
|
|
|
950
953
|
|
|
951
|
-
if (typeof descriptor.value === "function" && ((_this$
|
|
954
|
+
if (typeof descriptor.value === "function" && ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.autoBind)) {
|
|
952
955
|
var _adm$proxy_2;
|
|
953
956
|
|
|
954
957
|
descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);
|
|
955
958
|
}
|
|
956
959
|
|
|
957
|
-
var observableAnnotation = ((_this$
|
|
960
|
+
var observableAnnotation = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable;
|
|
958
961
|
return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);
|
|
959
962
|
}
|
|
960
963
|
|