Skip to content

Commit 65194b3

Browse files
committed
fix(type): composable to return correct Ref<T> instead of custom { value: T }
1 parent babdca6 commit 65194b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runtime/composables/queryRef.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useRoute } from 'nuxt/app'
22
import { ref, watch } from '#imports'
3+
import { type Ref } from '#imports'
34

45
type QueryParamType = 'string' | 'string[]' | 'number' | 'number[]' | 'boolean' | 'boolean[]' | 'object' | 'object[]'
56

@@ -19,7 +20,7 @@ export const queryRef = <T>(key: string, defaultValue: T | null = null) => {
1920
{ deep: true },
2021
)
2122

22-
return queryRef as { value: T }
23+
return queryRef as Ref<T>
2324
}
2425

2526
function updateQueryParamInURL(key, value, defaultValue, type: QueryParamType) {

0 commit comments

Comments
 (0)