ofTask
Function Signature
Task<'T> -> Task<Result<'T, exn>>Examples
Example 1
let result = TaskResult.ofTask (task { return 42 })
// task { return Ok 42 }Example 2
// Exceptions are NOT caught — they propagate out of the task
let result = TaskResult.ofTask (task { return failwith "something went wrong" })
// throws System.Exception("something went wrong")Last updated