Skip to content

Commit 3e17f33

Browse files
authored
fix: export Action type (#61)
* fix: export Action type * chore: changeset
1 parent 21bc980 commit 3e17f33

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/twelve-cobras-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openinula": patch
3+
---
4+
5+
fix: export Action type

packages/inula/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import {
5757
isPortal,
5858
} from './external/InulaIs';
5959
import { createStore, useStore, clearStore } from './inulax/store/StoreHandler';
60+
import type { Action } from './inulax/types';
6061
import * as reduxAdapter from './inulax/adapters/redux';
6162
import { watch } from './inulax/proxy/watch';
6263
import { act } from './external/TestUtil';
@@ -163,6 +164,7 @@ export {
163164
reduxAdapter,
164165
watch,
165166
toRaw,
167+
type Action,
166168
// 兼容ReactIs
167169
isFragment,
168170
isElement,

packages/inula/src/inulax/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export type StoreActions<S extends Record<string, unknown>, A extends UserAction
5959
[K in keyof A]: Action<A[K], S>;
6060
};
6161

62-
type Action<T extends ActionFunction<any>, S extends Record<string, unknown>> = (
62+
export type Action<T extends ActionFunction<any>, S extends Record<string, unknown>> = (
6363
this: StoreObj<S, any, any>,
6464
...args: RemoveFirstFromTuple<Parameters<T>>
6565
) => ReturnType<T>;

0 commit comments

Comments
 (0)