Skip to content

Commit

Permalink
types: try fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianOsipiuk committed Mar 21, 2024
1 parent c164ad3 commit 56a5ce8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/vue-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"scripts": {
"clean": "rimraf ./build && rimraf ./coverage",
"test:eslint": "eslint --ext .ts,.tsx ./src",
"test:types": "tsc",
"test:types": "vue-demi-switch 3 && tsc",
"test:lib": "pnpm run test:2 && pnpm run test:2.7 && pnpm run test:3",
"test:2": "vue-demi-switch 2 vue2 && vitest",
"test:2.7": "vue-demi-switch 2.7 vue2.7 && vitest",
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-query/src/useBaseQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from 'vue-demi'
import { useQueryClient } from './useQueryClient'
import { cloneDeepUnref, shouldThrowError, updateState } from './utils'
import type { ToRef } from 'vue-demi'
import type { Ref } from 'vue-demi'
import type {
DefaultedQueryObserverOptions,
QueryKey,
Expand All @@ -30,7 +30,7 @@ export type UseBaseQueryReturnType<
| 'fetchPreviousPage'
| 'refetch'
? TResult[K]
: ToRef<Readonly<TResult>[K]>
: Ref<Readonly<TResult>[K]>
} & {
suspense: () => Promise<TResult>
}
Expand Down
6 changes: 3 additions & 3 deletions packages/vue-query/src/useQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import { useQueryClient } from './useQueryClient'
import { cloneDeepUnref } from './utils'
import type { ShallowRef } from 'vue-demi'
import type { Ref } from 'vue-demi'
import type {
DefaultError,
DefinedQueryObserverResult,
Expand Down Expand Up @@ -258,7 +258,7 @@ export function useQueries<
combine?: (result: UseQueriesResults<T>) => TCombinedResult
},
queryClient?: QueryClient,
): Readonly<ShallowRef<TCombinedResult>> {
): Readonly<Ref<TCombinedResult>> {
if (process.env.NODE_ENV === 'development') {
if (!getCurrentScope()) {
console.warn(
Expand Down Expand Up @@ -342,5 +342,5 @@ export function useQueries<
unsubscribe()
})

return readonly(state) as Readonly<ShallowRef<TCombinedResult>>
return readonly(state) as Readonly<Ref<TCombinedResult>>
}

0 comments on commit 56a5ce8

Please sign in to comment.