forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.ts
More file actions
28 lines (22 loc) · 872 Bytes
/
app.ts
File metadata and controls
28 lines (22 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import App, {
TModule,
TDerive,
TOperation,
TConnect,
TAction,
} from 'react-overmind'
import * as main from './main'
type Module = TModule<typeof main>
export type Action<Value = void> = TAction<Value, Module>
export type Derive = TDerive<Module>
export type Mutation<Value = any> = TOperation.Mutation<Value, Module>
export type Do<Value = any> = TOperation.Do<Value, Module>
export type Filter<Value = any> = TOperation.Filter<Value, Module>
export type When<Value = any> = TOperation.When<Value, Module>
export type Fork<Value = any> = TOperation.Fork<Value, Module>
export type Map<Value, ReturnValue> = TOperation.Map<Value, ReturnValue, Module>
export type Try<Value, ReturnValue> = TOperation.Try<Value, ReturnValue, Module>
const app = new App(main)
export type Connect = TConnect<typeof app>
export const connect = app.connect
export default app