Skip to content

Commit

Permalink
Adds IF FABLE_COMPILER to any Async.AwaitTask type functions in Async…
Browse files Browse the repository at this point in the history
…Result
  • Loading branch information
TheAngryByrd committed Jul 22, 2020
1 parent aa9f8ad commit c551c3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FsToolkit.ErrorHandling/AsyncResult.fs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ module AsyncResult =
let foldResult onSuccess onError ar =
Async.map (Result.fold onSuccess onError) ar

#if !FABLE_COMPILER

let ofTask aTask =
aTask
|> Async.AwaitTask
Expand All @@ -34,7 +36,9 @@ module AsyncResult =
|> Async.AwaitTask
|> Async.Catch
|> Async.map Result.ofChoice


#endif

let retn x =
Ok x
|> Async.singleton
Expand Down

0 comments on commit c551c3c

Please sign in to comment.