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