[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Types](https://evolu.dev/docs/api-reference/common/Types) › Awaitable

```ts
type Awaitable<T> = T | PromiseLike<T>;
```

Defined in: [packages/common/src/Types.ts:235](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Types.ts#L235)

A value that can be awaited.

Use when a function may complete synchronously or asynchronously depending on
runtime conditions (e.g., cache hit vs network fetch).

### Example

```ts
const getData = (id: string): Awaitable<Data> => {
  const cached = cache.get(id);
  if (cached) return cached; // Sync path
  return fetchData(id); // Async path
};

// Always works
const data = await getData(id);

// Or optimize for sync path
const result = getData(id);
const data = isPromiseLike(result) ? await result : result;
```