File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
packages/overmind-website Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ The pipe is an operator in itself. Use it to compose other operators and pipes.
5757h(Example, { name: "api/pipe_pipe" })
5858```
5959
60+ ## run
61+ This operator is useful to run effects. It will just pass the current value a long.
62+
63+ ``` marksy
64+ h(Example, { name: "api/pipe_run" })
65+ ```
66+
6067## wait
6168Hold execution for set time.
6269
Original file line number Diff line number Diff line change @@ -4,8 +4,9 @@ export default (ts) =>
44 {
55 code : `
66import { map } from 'overmind'
7+ import { User } from './state'
78
8- export const getUser = map(({ api }) => api.getUser())
9+ export const getUser = map<string, User> (({ api }) => api.getUser())
910` ,
1011 } ,
1112 ]
Original file line number Diff line number Diff line change 1+ export default ( ts ) =>
2+ ts
3+ ? [
4+ {
5+ code : `
6+ import { run } from 'overmind'
7+
8+ export const doSomething = run<string>(({ someEffect }) => someEffect.run())
9+ ` ,
10+ } ,
11+ ]
12+ : [
13+ {
14+ code : `
15+ import { run } from 'overmind'
16+
17+ export const doSomething = run(({ someEffect }) => someEffect.run())
18+ ` ,
19+ } ,
20+ ]
You can’t perform that action at this time.
0 commit comments