# getCause

Returns the complete Cause only when the current state is a Failure.

## Signatures

```ts
export declare function getCause<A, E>(data: AsyncData<A, E>): Option.Option<Cause.Cause<E>>;
```

## Why

The accessor keeps typed errors, defects, and interruption intact for callers that need full failure diagnostics.

## Ownership and lifetime

This pure lookup acquires no resources and returns a reference to the persistent Cause.

## Examples

```ts
import { failure, getCause } from "@typed/async-data"
import { Cause } from "effect"
const cause = getCause(failure(Cause.fail("offline")))
```
