We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6babf3 commit 1fbfa69Copy full SHA for 1fbfa69
packages/runtime-core/src/helpers/useTemplateRef.ts
@@ -3,8 +3,8 @@ import { getCurrentInstance } from '../component'
3
import { warn } from '../warning'
4
import { EMPTY_OBJ } from '@vue/shared'
5
6
-export function useTemplateRef<T = unknown>(
7
- key: string,
+export function useTemplateRef<T = unknown, Keys extends string = string>(
+ key: Keys,
8
): Readonly<ShallowRef<T | null>> {
9
const i = getCurrentInstance()
10
const r = shallowRef(null)
0 commit comments