@chhsiao1981/use-thunk 14.0.2 → 14.0.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/action/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { ModuleState, State } from '../states';
|
|
|
2
2
|
import type { ActionOrThunk } from './ActionOrThunk';
|
|
3
3
|
import type BaseAction from './baseAction';
|
|
4
4
|
import type { Thunk } from './thunk';
|
|
5
|
-
export type {
|
|
5
|
+
export type { ActionOrThunk, BaseAction, Thunk };
|
|
6
6
|
export type ActionFunc<S extends State> = (...params: any[]) => ActionOrThunk<S>;
|
|
7
|
+
export type BaseActionFunc = (...params: any[]) => BaseAction;
|
|
7
8
|
export type ThunkFunc<S extends State> = (...params: any[]) => Thunk<S>;
|
|
8
9
|
export type getModuleState<S extends State> = () => ModuleState<S>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { ThunkFunc } from '../action';
|
|
1
|
+
import type { BaseActionFunc, ThunkFunc } from '../action';
|
|
2
2
|
import type { State } from '../states';
|
|
3
3
|
import { DEFAULT_DO_MODULE, type defaultDoModule } from './defaultDoModule';
|
|
4
4
|
export { DEFAULT_DO_MODULE, type defaultDoModule };
|
|
5
5
|
export interface doModule<S extends State> {
|
|
6
|
-
[action: string]: ThunkFunc<S
|
|
6
|
+
[action: string]: ThunkFunc<S> | BaseActionFunc;
|
|
7
7
|
}
|
|
8
8
|
export type ThunkModule<S extends State> = {
|
|
9
9
|
name: string;
|
|
10
10
|
defaultState: S;
|
|
11
|
-
[action: string]: ThunkFunc<S> | string | S;
|
|
11
|
+
[action: string]: ThunkFunc<S> | string | S | BaseActionFunc;
|
|
12
12
|
};
|
|
13
13
|
export type toDoModule<T extends ThunkModule<any>> = Omit<T, 'name' | 'defaultState'>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chhsiao1981/use-thunk",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A framework easily using useThunk to manage the data-state.",
|
|
6
6
|
"homepage": "https://github.com/chhsiao1981/use-thunk",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@babel/core": "^7.29.0",
|
|
45
|
-
"@biomejs/biome": "
|
|
45
|
+
"@biomejs/biome": "2.3.1",
|
|
46
46
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
47
47
|
"@types/babel__core": "^7.20.5",
|
|
48
48
|
"@types/node": "^25.9.3",
|