TanStack
Batcher API Reference

AngularAsyncBatcher

Defined in: async-batcher/injectAsyncBatcher.ts:26

Extends

  • Omit<AsyncBatcher<TValue>, "store" | "options" | "setOptions">

Type Parameters

TValue

TValue

TSelected

TSelected = { }

Properties

options

ts
options: Omit<Required<AsyncBatcherOptions<TValue>>,
  | "initialState"
  | "key"
  | "onError"
  | "onSettled"
  | "onSuccess"
  | "onItemsChange"> & Partial<Pick<Required<AsyncBatcherOptions<TValue>>,
  | "initialState"
  | "key"
  | "onError"
  | "onSettled"
  | "onSuccess"
| "onItemsChange">> & AngularAsyncBatcherOptions<TValue, TSelected>;

Defined in: async-batcher/injectAsyncBatcher.ts:30


setOptions

ts
setOptions: (options) => void;

Defined in: async-batcher/injectAsyncBatcher.ts:32

Parameters

options

Partial<AngularAsyncBatcherOptions<TValue, TSelected>>

Returns

void


state

ts
readonly state: Signal<Readonly<TSelected>>;

Defined in: async-batcher/injectAsyncBatcher.ts:40

Reactive state signal that will be updated when the async batcher state changes

Use this instead of batcher.store.state


store

ts
readonly store: Store<Readonly<AsyncBatcherState<TValue>>>;

Defined in: async-batcher/injectAsyncBatcher.ts:45

Deprecated

Use batcher.state instead of batcher.store.state if you want to read reactive state. The state on the store object is not reactive in Angular signals.