query
query copied to clipboard
[WIP] Typings optimizations
Working on issues adapting the new queryKey typings inference to Vue. I Found few things that could be optimised on the core package. This PR is for those typings optimisations. See changes below:
- [ ] Many Types relies on useless generic TQueryFnData:
- [ ] clean useless generic TQueryFnData
- [x] Fix false positive test on queryObserver "should structurally share placeholder data" where placeholder is of type
{}
while the queryFn returnsstring
(the error is hidden due to useless Generic that catch this bad{}
type)
- [ ] work on query result typings, I want to include all
| undefined
union typings in the Generic TData if no initialData is defined. Then the typesDefinedInitialDataOptions
andUndefinedInitialDataOptions
in React and Vue packages will be useless which schould solve some issues on Vue due to interactions between& { initialData: T }
statement andMaybeRefDeep
type - [ ] propagate changes to framework packages
- [ ] React
- [ ] Vue
- [ ] Solid
- [ ] Svelte
- [ ] Improve Inference from QueryKey in Vue package
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
query | ⬜️ Ignored (Inspect) | Visit Preview | Jan 8, 2024 3:32pm |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 9814cc39e015a043701233ecb8e0881e56c71fb6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
🟥 Failed Commands |
---|
nx affected --targets=test:eslint,test:lib,test:types,test:build,build --exclude=examples/** |
Sent with 💌 from NxCloud.
@TkDodo I'm starting this PR if you want to have a look at my work on typings. I'm still working on implementing our QueryKey inference system in Vue but there is some bugs that I didn't manage to solve simply so I start some work on cleaning the package typings. I'll try to describe all my changes and ideas in the description. Feel free to argue it if you don't understand what I'm trying to do or if you have other ideas.