batch
import { batch } from 'pixi-silk/signal';
function batch<R>(fn: () => R): R;
Runs fn and delivers the change notifications once, after it returns, even if it throws.
A signal set several times notifies once, with the value from before the batch as previous.
It notifies nothing if it ends equal to that value. Batches nest.
Type Parameters#
| Type Parameter |
|---|
R |
Parameters#
| Parameter | Type |
|---|---|
fn | () => R |
Returns#
R