Import
import { fromResult } from "@typed/async-data";Signatures
export declare const fromResult: <A, E>(result: Result.Result<A, E>) => AsyncData<A, E>;Why
Result has only typed success/failure, so a failed result becomes Cause.fail without inventing defects or interruption.
Ownership and lifetime
This pure conversion acquires no resources and retains the Result payload.
Examples
import { fromResult } from "@typed/async-data"
import { Result } from "effect"
const state = fromResult(Result.succeed(1))