# Fx.fromEffect

Creates an Fx from an Effect.

If the Effect succeeds, the Fx emits the value and completes.
If the Effect fails, the Fx fails with the same error.

## Signatures

```ts
export declare const fromEffect: <A, E = never, R = never>(effect: Effect.Effect<A, E, R>) => Fx<A, E, R>;
```

## Why

A single Effect result can enter push composition without losing its typed error
or service requirements.

## Ownership and lifetime

Conversion is lazy. Each run executes the Effect once in the run's fiber, forwards
its success or full cause to the sink, and completes after the sink handler. The
run's interruption and scope own any acquisition performed by the Effect.

## Examples

```ts
import { Effect } from "effect"
import { collectAll, fromEffect } from "@typed/fx/Fx"

const source = fromEffect(Effect.succeed(42))
const program = collectAll(source)
```
