cogsbox-state 0.5.389 → 0.5.390
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/CogsState.d.ts +5 -0
- package/dist/CogsState.jsx +500 -490
- package/dist/CogsState.jsx.map +1 -1
- package/package.json +1 -1
- package/src/CogsState.tsx +28 -0
package/dist/CogsState.d.ts
CHANGED
|
@@ -123,8 +123,13 @@ export type ObjectEndType<T> = EndType<T> & {
|
|
|
123
123
|
stateObject: (callbackfn: (value: T, setter: StateObject<T>) => void) => any;
|
|
124
124
|
delete: () => void;
|
|
125
125
|
};
|
|
126
|
+
export type ValidationError = {
|
|
127
|
+
path: (string | number)[];
|
|
128
|
+
message: string;
|
|
129
|
+
};
|
|
126
130
|
type EffectFunction<T, R> = (state: T) => R;
|
|
127
131
|
export type EndType<T, IsArrayElement = false> = {
|
|
132
|
+
addValidation: (errors: ValidationError[]) => void;
|
|
128
133
|
applyJsonPatch: (patches: any[]) => void;
|
|
129
134
|
update: UpdateType<T>;
|
|
130
135
|
_path: string[];
|