Add typechecking in CI for react-data-query - #10010
Draft
mcmire wants to merge 2 commits into
Draft
Conversation
mcmire
commented
Aug 28, 2026
| it('calls the underlying TanStack query function', () => { | ||
| const options = { queryKey: ['foo'] }; | ||
| const options = { | ||
| // Type assertion: `useQuery` wants `[string, ...Json[]]`, |
Collaborator
Author
There was a problem hiding this comment.
Not great, but I think this is just how useQuery works: if you store options in a variable and pass the variable into useQuery you have to add some kind of type assertion to satisfy the strange types that useQuery has.
Collaborator
Author
|
Adding |
To ensure all files in `react-data-query` — not just production files —
are typechecked in CI now and in the future:
- Add `tsconfig.lint.json` for `react-data-query` and hook it into root `tsconfig.lint.json`
- Fix type errors in tests
- Refactor `createUIQueryClient` test setup by porting
`createRootMessenger` and `createServiceMessenger` helpers from
`base-data-service` tests
- Change `createUIQueryClient` test setup to create a messenger
adapter instead of passing a messenger, since that isn't supported
- Remove `tstyche` test and dependency (it was only added as a stopgap
until we had true typechecking in CI)
mcmire
force-pushed
the
enable-typechecking-for-react-data-query
branch
from
August 28, 2026 20:00
1c8634e to
9ff4d1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
To ensure all files in
react-data-query— not just production files — are typechecked in CI now and in the future:tsconfig.lint.jsonforreact-data-queryand hook it into roottsconfig.lint.jsoncreateUIQueryClienttest setup by portingcreateRootMessengerandcreateServiceMessengerhelpers frombase-data-servicetestscreateUIQueryClienttest setup to create a messenger adapter instead of passing a messenger, since that isn't supportedtstychetest and dependency (it was only added as a stopgap until we had true typechecking in CI)References
Checklist