Skip to content

docs(persister): document asynchronous serialization callbacks - #11411

Open
grzdev wants to merge 1 commit into
TanStack:mainfrom
grzdev:docs/async-persister-serialization
Open

docs(persister): document asynchronous serialization callbacks#11411
grzdev wants to merge 1 commit into
TanStack:mainfrom
grzdev:docs/async-persister-serialization

Conversation

@grzdev

@grzdev grzdev commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

The createAsyncStoragePersister options documentation currently lists serialize and deserialize as synchronous functions returning string and PersistedClient.

In the implementation (packages/query-async-storage-persister/src/index.ts), both options accept and await MaybePromise<string> and MaybePromise<PersistedClient>. This update aligns the documented TypeScript interface signatures and adds a note explaining that both callbacks support synchronous and asynchronous (Promise) returns.

Documentation only. Verified against createAsyncStoragePersister implementation and types; git diff --check passes cleanly.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

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

Summary by CodeRabbit

  • Documentation
    • Clarified that asynchronous storage serialization and deserialization callbacks may return results either synchronously or asynchronously.
    • Updated the documented callback types to reflect support for promises.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: b624726f-05db-42af-9256-dc10e19f6fda

📥 Commits

Reviewing files that changed from the base of the PR and between 1893a96 and 774f927.

📒 Files selected for processing (1)
  • docs/framework/react/plugins/createAsyncStoragePersister.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The async storage persister documentation updates serialize and deserialize to support synchronous or promise-based results.

Changes

Async persister documentation

Layer / File(s) Summary
Callback types and documentation
docs/framework/react/plugins/createAsyncStoragePersister.md
The callback return types now use MaybePromise. The documentation states that callbacks can return results synchronously or asynchronously.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 774f9

This documentation update accurately describes existing synchronous and Promise-based serialization support, with no runtime or release behavior changed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation update for asynchronous serialization callbacks.
Description check ✅ Passed The description explains the changes and motivation, completes all required checklist sections, and correctly identifies the change as documentation-only with no release impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant