redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

Actually document the `TypedUse*` types

Open markerikson opened this issue 1 month ago • 2 comments

We have the TypedUse* types (TypedUseQuery, etc) to allow userland typing of things like hooks and hook results, but I don't think we actually describe those in the docs. We should add those.

markerikson avatar Nov 20 '25 19:11 markerikson

Hi! 👋

I'd like to work on this issue.

I looked through the existing docs and confirmed that the TypedUse* types (TypedUseQuery, TypedUseMutation, TypedUseQueryState, etc.) are currently not documented anywhere.

My plan is:

  • Add a new section to the RTK Query TypeScript docs that introduces each TypedUse* helper type
  • Describe when users may need these types (custom wrappers for hooks, typed API composition, etc.)
  • Include short code examples for common use cases
  • Add links to the relevant TypeScript source definitions

Does this direction look good to you?
If so, I’ll open a PR. 👍

semimikoh avatar Nov 24 '25 06:11 semimikoh

@semimikoh sure, sounds good!

markerikson avatar Nov 24 '25 16:11 markerikson