as-model 0.4.1 → 0.4.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/dist/index.js +12 -0
- package/esm/store/index.js +8 -0
- package/esm/updater/index.js +1 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1294,6 +1294,18 @@ function createStore(modelLike) {
|
|
|
1294
1294
|
getStoreInstance: function getStoreInstance() {
|
|
1295
1295
|
return extractInstance(updater, void 0, propertiesCache);
|
|
1296
1296
|
},
|
|
1297
|
+
config: function config4(customizedConfig) {
|
|
1298
|
+
updater.mutate(function(u) {
|
|
1299
|
+
var middleWares = customizedConfig.middleWares, rest = _object_without_properties(customizedConfig, [
|
|
1300
|
+
"middleWares"
|
|
1301
|
+
]);
|
|
1302
|
+
var updaterConfig = u.config;
|
|
1303
|
+
var nextUpdaterConfig = _object_spread({}, updaterConfig, rest);
|
|
1304
|
+
return _object_spread_props(_object_spread({}, u), {
|
|
1305
|
+
config: nextUpdaterConfig
|
|
1306
|
+
});
|
|
1307
|
+
});
|
|
1308
|
+
},
|
|
1297
1309
|
update: function update(args) {
|
|
1298
1310
|
var updateArgs = args !== null && args !== void 0 ? args : {};
|
|
1299
1311
|
if (updateArgs.key) {
|
package/esm/store/index.js
CHANGED
|
@@ -109,6 +109,14 @@ function createStore(modelLike, config = {}) {
|
|
|
109
109
|
getStoreInstance() {
|
|
110
110
|
return extractInstance(updater, void 0, propertiesCache);
|
|
111
111
|
},
|
|
112
|
+
config(customizedConfig) {
|
|
113
|
+
updater.mutate((u) => {
|
|
114
|
+
const _a = customizedConfig, { middleWares } = _a, rest = __objRest(_a, ["middleWares"]);
|
|
115
|
+
const updaterConfig = u.config;
|
|
116
|
+
const nextUpdaterConfig = __spreadValues(__spreadValues({}, updaterConfig), rest);
|
|
117
|
+
return __spreadProps(__spreadValues({}, u), { config: nextUpdaterConfig });
|
|
118
|
+
});
|
|
119
|
+
},
|
|
112
120
|
update(args) {
|
|
113
121
|
const updateArgs = args != null ? args : {};
|
|
114
122
|
if (updateArgs.key) {
|
package/esm/updater/index.js
CHANGED
package/index.d.ts
CHANGED