diff --git a/docs/api/autoBatchEnhancer.mdx b/docs/api/autoBatchEnhancer.mdx index be95ae04a2..6ddf9f485d 100644 --- a/docs/api/autoBatchEnhancer.mdx +++ b/docs/api/autoBatchEnhancer.mdx @@ -99,7 +99,7 @@ Any action that is tagged with `action.meta[SHOULD_AUTOBATCH] = true` will be tr - `{type: 'raf'}`: queues using `requestAnimationFrame` (default) - `{type: 'tick'}`: queues using `queueMicrotask` -- `{type: 'timer, timeout: number}`: queues using `setTimeout` +- `{type: 'timer', timeout: number}`: queues using `setTimeout` - `{type: 'callback', queueNotification: (notify: () => void) => void}`: lets you provide your own callback, such as a debounced or throttled function The default behavior is to queue the notifications using `requestAnimationFrame`. diff --git a/packages/toolkit/src/autoBatchEnhancer.ts b/packages/toolkit/src/autoBatchEnhancer.ts index 560cb49e18..7479d49ef5 100644 --- a/packages/toolkit/src/autoBatchEnhancer.ts +++ b/packages/toolkit/src/autoBatchEnhancer.ts @@ -44,7 +44,7 @@ export type AutoBatchOptions = * By default, it will queue a notification for the end of the event loop tick. * However, you can pass several other options to configure the behavior: * - `{type: 'tick'}`: queues using `queueMicrotask` - * - `{type: 'timer, timeout: number}`: queues using `setTimeout` + * - `{type: 'timer', timeout: number}`: queues using `setTimeout` * - `{type: 'raf'}`: queues using `requestAnimationFrame` (default) * - `{type: 'callback', queueNotification: (notify: () => void) => void}`: lets you provide your own callback *