-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(map): handle errors that are thrown in res()
- Loading branch information
1 parent
37182c4
commit 9296583
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Created by tushar on 2019-04-18 | ||
*/ | ||
|
||
import {FIO} from '../../src/internals/FIO' | ||
|
||
import {IOCollector} from './IOCollector' | ||
|
||
/** | ||
* Helpful wrapper over IOCollector | ||
* Forks the IO and runs everything in the queue. | ||
*/ | ||
export const ForkNRun = <A>(io: FIO<A>) => { | ||
const {fork, timeline, scheduler} = IOCollector(io) | ||
fork() | ||
scheduler.run() | ||
|
||
return {timeline} | ||
} |