Skip to content

[paced mutations]: Fix how we init AsyncQueuer#748

Closed
KyleAMathews wants to merge 3 commits intomainfrom
claude/investigate-test-failure-011CUm18SCswSXUtFx4Td2Gg
Closed

[paced mutations]: Fix how we init AsyncQueuer#748
KyleAMathews wants to merge 3 commits intomainfrom
claude/investigate-test-failure-011CUm18SCswSXUtFx4Td2Gg

Conversation

@KyleAMathews
Copy link
Copy Markdown
Collaborator

The AsyncQueuer constructor signature requires:

  1. A function that processes each queued item as the first parameter
  2. An options object as the second parameter

The previous code incorrectly passed only the options object, causing TypeScript errors:

  • 'concurrency' does not exist in type '(item void) => Promise'
  • Argument of type '() => Promise' is not assignable to parameter type 'void'

Fixed by:

  • Changing AsyncQueuer type parameter from void to () => Promise
  • Passing an async function as the first parameter that executes queued tasks
  • Moving options to the second parameter

This resolves the type check errors that were appearing in test runs.

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 3, 2025

🦋 Changeset detected

Latest commit: 0fc4748

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@tanstack/db Patch
@tanstack/angular-db Patch
@tanstack/electric-db-collection Patch
@tanstack/query-db-collection Patch
@tanstack/react-db Patch
@tanstack/rxdb-db-collection Patch
@tanstack/solid-db Patch
@tanstack/svelte-db Patch
@tanstack/trailbase-db-collection Patch
@tanstack/vue-db Patch
todos Patch
@tanstack/db-example-paced-mutations-demo Patch
@tanstack/db-example-react-todo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@KyleAMathews KyleAMathews force-pushed the claude/investigate-test-failure-011CUm18SCswSXUtFx4Td2Gg branch from eeab839 to 91af66f Compare November 3, 2025 13:39
The AsyncQueuer constructor signature requires:
1. A function that processes each queued item as the first parameter
2. An options object as the second parameter

The previous code incorrectly passed only the options object, causing
TypeScript errors during type checking and builds:
- Parameter 'task' implicitly has an 'any' type
- Expected 0-1 arguments, but got 2

Fixed by:
- Passing an async function as the first parameter that executes queued tasks
- Adding explicit type annotation (task: () => Promise<void>)
- Moving options to the second parameter

This resolves the type check errors that were preventing builds from completing.
@KyleAMathews KyleAMathews force-pushed the claude/investigate-test-failure-011CUm18SCswSXUtFx4Td2Gg branch from 91af66f to 33ec8cc Compare November 3, 2025 13:41
The asyncQueue helper function provides the correct API for creating
queued task processors, avoiding constructor signature issues with
AsyncQueuer in @tanstack/[email protected].
@KyleAMathews KyleAMathews force-pushed the claude/investigate-test-failure-011CUm18SCswSXUtFx4Td2Gg branch from c231b68 to cbef440 Compare November 3, 2025 13:52
Use AsyncQueuer constructor directly instead of asyncQueue helper
to avoid type resolution issues on CI. The constructor API is more
stable and works consistently across different TypeScript configurations.
@KyleAMathews KyleAMathews force-pushed the claude/investigate-test-failure-011CUm18SCswSXUtFx4Td2Gg branch from 927dd15 to 0fc4748 Compare November 3, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants