as-model 0.2.2 → 0.2.3
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 +6 -0
- package/esm/store/index.js +3 -0
- package/esm/store/instance.js +3 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1014,6 +1014,9 @@
|
|
|
1014
1014
|
function generateInstance() {
|
|
1015
1015
|
return proxiedInstance;
|
|
1016
1016
|
}
|
|
1017
|
+
if (wrapper == null) {
|
|
1018
|
+
return proxiedInstance;
|
|
1019
|
+
}
|
|
1017
1020
|
var wrapped = wrapper(generateInstance);
|
|
1018
1021
|
if ((typeof wrapped === "undefined" ? "undefined" : _type_of(wrapped)) === "object" && wrapped != null) {
|
|
1019
1022
|
return cacheProperties(_object_spread_props(_object_spread({}, cache), {
|
|
@@ -1237,6 +1240,9 @@
|
|
|
1237
1240
|
getInstance: function getInstance() {
|
|
1238
1241
|
return extractInstance(updater, key.wrapper, propertiesCache);
|
|
1239
1242
|
},
|
|
1243
|
+
getStoreInstance: function getStoreInstance() {
|
|
1244
|
+
return extractInstance(updater, void 0, propertiesCache);
|
|
1245
|
+
},
|
|
1240
1246
|
update: function update(args) {
|
|
1241
1247
|
var updateArgs = args !== null && args !== void 0 ? args : {};
|
|
1242
1248
|
if (updateArgs.key) {
|
package/esm/store/index.js
CHANGED
|
@@ -106,6 +106,9 @@ function createStore(modelLike, config = {}) {
|
|
|
106
106
|
getInstance() {
|
|
107
107
|
return extractInstance(updater, key.wrapper, propertiesCache);
|
|
108
108
|
},
|
|
109
|
+
getStoreInstance() {
|
|
110
|
+
return extractInstance(updater, void 0, propertiesCache);
|
|
111
|
+
},
|
|
109
112
|
update(args) {
|
|
110
113
|
const updateArgs = args != null ? args : {};
|
|
111
114
|
if (updateArgs.key) {
|
package/esm/store/instance.js
CHANGED
|
@@ -161,6 +161,9 @@ function extractInstance(updater, wrapper, cache, opts) {
|
|
|
161
161
|
function generateInstance() {
|
|
162
162
|
return proxiedInstance;
|
|
163
163
|
}
|
|
164
|
+
if (wrapper == null) {
|
|
165
|
+
return proxiedInstance;
|
|
166
|
+
}
|
|
164
167
|
const wrapped = wrapper(generateInstance);
|
|
165
168
|
if (typeof wrapped === "object" && wrapped != null) {
|
|
166
169
|
return cacheProperties(__spreadProps(__spreadValues({}, cache), { target: wrapped }), handleGetter)();
|
package/index.d.ts
CHANGED