# AsyncOnce

`import { AsyncOnce } from "destack:async";`

One-time async execution state.

```ds title="AsyncOnce"
export class AsyncOnce {
    call(body: () => Promise<void>): Promise<void>;
    isCompleted(): boolean;
}
```

[language/library/src/async/once.ds:8:18](https://github.com/destack-sh/destack/blob/main/language/library/src/async/once.ds#L8-L18)

## Members

### `call(body: () => Promise<void>): Promise<void>`

Run `body` once.

### `isCompleted(): boolean`

Return true after the body has completed.
