@chhsiao1981/use-thunk 9.0.4 → 9.0.5
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/package.json +1 -1
- package/src/setData.ts +1 -1
- package/types/setData.d.ts +1 -1
- package/types/thunkModuleFuncMap.d.ts +1 -1
package/package.json
CHANGED
package/src/setData.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { BaseAction } from './action'
|
|
|
2
2
|
import type { ClassState, State } from './stateTypes'
|
|
3
3
|
|
|
4
4
|
export const SET_DATA = '@chhsiao1981/use-thunk/SET_DATA'
|
|
5
|
-
export const setData = <S extends State>(myID: string, data: S): BaseAction => ({
|
|
5
|
+
export const setData = <S extends State>(myID: string, data: Partial<S>): BaseAction => ({
|
|
6
6
|
myID,
|
|
7
7
|
type: SET_DATA,
|
|
8
8
|
data,
|
package/types/setData.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BaseAction } from './action';
|
|
2
2
|
import type { ClassState, State } from './stateTypes';
|
|
3
3
|
export declare const SET_DATA = "@chhsiao1981/use-thunk/SET_DATA";
|
|
4
|
-
export declare const setData: <S extends State>(myID: string, data: S) => BaseAction;
|
|
4
|
+
export declare const setData: <S extends State>(myID: string, data: Partial<S>) => BaseAction;
|
|
5
5
|
export declare const reduceSetData: <S extends State>(classState: ClassState<S>, action: BaseAction) => ClassState<S>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_THUNK_MODULE_FUNC_MAP: {
|
|
2
2
|
init: <S extends import("./stateTypes").State>(params: import("./init").InitParams<S>, myuuidv4?: () => string) => import("./action").Thunk<S>;
|
|
3
|
-
setData: <S extends import("./stateTypes").State>(myID: string, data: S) => import("./action").BaseAction;
|
|
3
|
+
setData: <S extends import("./stateTypes").State>(myID: string, data: Partial<S>) => import("./action").BaseAction;
|
|
4
4
|
remove: <S extends import("./stateTypes").State>(myID: string, isFromParent?: boolean) => import("./action").Thunk<S>;
|
|
5
5
|
addChild: (myID: string, child: import("./stateTypes").NodeMeta) => import("./addRelation").AddRelationAction;
|
|
6
6
|
removeChild: <S extends import("./stateTypes").State>(myID: string, childID: string, childClass: string, isFromChild?: boolean) => import("./action").Thunk<S>;
|