Skip to content

Commit 79cf050

Browse files
committed
fix: add import for ref, watch
1 parent ab4108e commit 79cf050

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/runtime/composables/queryRef.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { useRoute } from 'nuxt/app'
2-
3-
declare const ref, watch
2+
import { ref, watch } from '#imports'
43

54
type QueryParamType = 'string' | 'string[]' | 'number' | 'number[]' | 'boolean' | 'boolean[]' | 'object' | 'object[]'
65

7-
export const queryRef = <T>(key: string, defaultValue: T = null) => {
6+
export const queryRef = <T>(key: string, defaultValue: T | null = null) => {
87
const type = getType(defaultValue)
98

109
const loadedValue = loadQueryParamFromURL(key, type)

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"dist",
55
"node_modules",
66
"playground",
7-
]
7+
],
8+
"compilerOptions": {
9+
"noImplicitAny": false,
10+
}
811
}

0 commit comments

Comments
 (0)