@oxog/state 1.3.1 → 1.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/dist/{chunk-R6MFYVYQ.js → chunk-2ZNKQLNO.js} +8 -2
- package/dist/chunk-2ZNKQLNO.js.map +1 -0
- package/dist/{chunk-IWT3T2PM.cjs → chunk-OS24HBPW.cjs} +8 -2
- package/dist/chunk-OS24HBPW.cjs.map +1 -0
- package/dist/iife/index.global.js +1 -1
- package/dist/index.cjs +70 -70
- package/dist/index.js +2 -2
- package/dist/vanilla.cjs +66 -66
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-IWT3T2PM.cjs.map +0 -1
- package/dist/chunk-R6MFYVYQ.js.map +0 -1
|
@@ -561,6 +561,12 @@ var StoreImpl = class {
|
|
|
561
561
|
if (update === null || update === void 0) {
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
|
+
if (typeof update !== "object" || Array.isArray(update)) {
|
|
565
|
+
throw new StoreError(
|
|
566
|
+
"INVALID_STATE_UPDATE" /* INVALID_STATE_UPDATE */,
|
|
567
|
+
`setState expects an object or a function returning one, got ${Array.isArray(update) ? "an array" : typeof update}`
|
|
568
|
+
);
|
|
569
|
+
}
|
|
564
570
|
this.state = { ...this.state, ...withoutProtoKey(update) };
|
|
565
571
|
this.notifyOrQueue(this.state, prevState);
|
|
566
572
|
}
|
|
@@ -3152,5 +3158,5 @@ function compose(...middlewares) {
|
|
|
3152
3158
|
}
|
|
3153
3159
|
|
|
3154
3160
|
export { StoreError, StoreErrorCode, assertState, batch, combineComputed, combineEffects, combineSlices, combineValidators, compose, computed, createAsyncValidator, createDebouncedEffect, createEffect, createFederatedComputed, createFederatedSelector, createFederation, createFieldValidator, createLogger, createMockStorage, createNamespacedSlice, createSimpleEffect, createSimpleMiddleware, createSlice, createStorage, createStore, createSubscriber, createTestStore, createValidator, createWithMiddleware, deepClone, deepEqual, deepMerge, delay, devtools, effects, extendStore, flushMicrotasks, hasHistory, history, identity, immer, isFunction, logger, memoizeSelector, middlewareCompat, mockAction, omit, persist, pick, produce, resetSlices, selector, sessionStorage, shallowEqual, snapshot, spyOnStore, stateDiff, subscribeOnce, subscribeToMany, subscribeWithOptions, sync, toMiddlewareApi, triggerSync, validate, waitForFederated };
|
|
3155
|
-
//# sourceMappingURL=chunk-
|
|
3156
|
-
//# sourceMappingURL=chunk-
|
|
3161
|
+
//# sourceMappingURL=chunk-2ZNKQLNO.js.map
|
|
3162
|
+
//# sourceMappingURL=chunk-2ZNKQLNO.js.map
|