> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# asyncNoop es-toolkit

A function that asynchronously does nothing.

```typescript
const promise = asyncNoop();
```

::: info [`noop`](https://massaman.dev/reference/function/noop.md) function

If you need a function that synchronously does nothing, use the `noop` function which immediately returns `void`.

:::

## Usage

### `asyncNoop()`

Use `asyncNoop` when you need to fill a placeholder or use as a default value where an asynchronous function is required. It returns a `Promise` that resolves to `undefined`.

```typescript
import { asyncNoop } from 'es-toolkit/function';

// Example using as a default value
interface Props {
  fetchData?: () => Promise<void>;
}

function MyComponent({ fetchData = asyncNoop }: Props) {
  const handleFetchData = async () => {
    // fetchData is always a function, so it's safe to call
    await fetchData();
  };

  handleFetchData();
}

// Example of direct invocation
asyncNoop();
// Returns: Promise<void>

await asyncNoop();
// Returns: undefined
```

#### Returns

A `Promise` that resolves to `undefined`.

```typescript
Promise<void>
```


Source: es-toolkit

Re-exported verbatim from [`es-toolkit`](https://es-toolkit.dev/reference/function/asyncNoop.html). Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.
