query icon indicating copy to clipboard operation
query copied to clipboard

fix(vue-query): fix queryOptions return type

Open jiwlee97 opened this issue 1 year ago • 4 comments

I updated the return type of the queryOptions function with Vue's UnwrapRef.

[AS-IS] image

[TO-BE] image

close #7892

jiwlee97 avatar Nov 19 '24 12:11 jiwlee97

☁️ Nx Cloud Report

CI is running/has finished running commands for commit c4dcd3c56bf90e8c2808a39db65a8cd57c62eaae. 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:sherif,test:knip,test:eslint,test:lib,test:types,test:build,build --parallel=3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Nov 25 '24 11:11 nx-cloud[bot]

Open in Stackblitz

More templates

@tanstack/angular-query-devtools-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-devtools-experimental@8305
@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@8305
@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@8305
@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@8305
@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@8305
@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@8305
@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@8305
@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@8305
@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@8305
@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@8305
@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@8305
@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@8305
@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@8305
@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@8305
@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@8305
@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@8305
@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@8305
@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@8305
@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@8305
@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@8305
@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@8305

commit: c4dcd3c

pkg-pr-new[bot] avatar Nov 25 '24 11:11 pkg-pr-new[bot]

I have tried that before, but it would not work.

  1. You can actually pass options as a ref, so this change would actually produce wrong types.
  2. It breaks type inference in other cases.

I have yet to find a proper fix for this.

DamianOsipiuk avatar Nov 25 '24 11:11 DamianOsipiuk

Thanks for the great work @DamianOsipiuk.

May I ask if you came further on this issue ? Would be really helpful to get this solved.

senaria avatar Apr 29 '25 10:04 senaria