Skip to content

API reference > @kontsedal/olas-core > batch

batch() function ​

Batch synchronous signal writes so subscribers see one notification at the end of the batch rather than one per write. Returns whatever fn returns.

Signature:

typescript
export declare function batch<T>(fn: () => T): T;

Parameters ​

Parameter

Type

Description

fn

() => T

Returns:

T

Released under the MIT License.