# Type Alias: ResultMaybeAsync\<T, E>

> **ResultMaybeAsync**\<`T`, `E`> = [`Result`](./Result.Result.md)\<`T`, `E`> | `Promise`\<[`Result`](./Result.Result.md)\<`T`, `E`>>

A result that may be either synchronous or asynchronous.

## Type Parameters

### T

`T`

The type of the [Success](./Result.Success.md) value.

### E

`E`

The type of the [Failure](./Result.Failure.md) value.

## Examples

**Synchronous Case**

```ts
import { Result } from '@praha/byethrow';

const result: Result.ResultMaybeAsync<number, string> = { type: 'Success', value: 10 };
```

**Asynchronous Case**

```ts
import { Result } from '@praha/byethrow';

const result: Result.ResultMaybeAsync<number, string> = Promise.resolve({ type: 'Failure', error: 'error' });
```
