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

Defined in: [packages/common/src/Microtask.ts:16](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Microtask.ts#L16)

Batches values and flushes them in a single microtask.

Calls to [MicrotaskBatch.push](https://evolu.dev/docs/api-reference/common/Microtask/interfaces/MicrotaskBatch#push) within the same tick are coalesced into
one flush.

## Extends

- [`Disposable`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html#using-declarations-and-explicit-resource-management)

## Methods

<a id="dispose"></a>

### \[dispose\]()

```ts
dispose: void;
```

Defined in: node\_modules/@typescript/old/lib/lib.esnext.disposable.d.ts:34

#### Inherited from

```ts
Disposable.[dispose]
```

## Properties

<a id="flushnow"></a>

### flushNow

```ts
readonly flushNow: () => void;
```

Defined in: [packages/common/src/Microtask.ts:21](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Microtask.ts#L21)

Flushes queued items immediately.

### push

```ts
readonly push: (item: T) => void;
```

Defined in: [packages/common/src/Microtask.ts:18](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Microtask.ts#L18)

Enqueues one item and schedules a microtask flush if needed.