We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a116103 + 1f739ba commit 24e6021Copy full SHA for 24e6021
packages/node_modules/overmind/src/types.ts
@@ -25,6 +25,19 @@ export interface TConfig<Config extends Configuration> {
25
effects: Config['effects'] & {}
26
}
27
28
+// This is the type of the `app` argument passed in components.
29
+export type TApp<Config extends Configuration> = {
30
+ // Resolves `Derive` types in state.
31
+ state: ResolveState<Config['state'] & {}>
32
+ actions: ResolveActions<Config['actions']>
33
+ reaction: (
34
+ name: string,
35
+ stateCb: (state: TApp<Config>['state']) => any,
36
+ Function
37
+ ) => void
38
+}
39
+
40
+// This is the type of the argument passed in actions.
41
export type TValueContext<Config extends Configuration, Value> = TBaseContext<
42
Config
43
> & {
0 commit comments