Skip to content

Commit fffbb9e

Browse files
authored
fix(types): $refs can also contain ComponentPublicInstance (#12659)
1 parent e0a9546 commit fffbb9e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

types/vue.d.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { VNode, VNodeData, VNodeChildren, NormalizedScopedSlot } from './vnode'
1414
import { PluginFunction, PluginObject } from './plugin'
1515
import { DefineComponent } from './v3-define-component'
1616
import { nextTick } from './v3-generated'
17+
import { ComponentPublicInstance } from 'v3-component-public-instance'
1718

1819
export interface CreateElement {
1920
(
@@ -58,7 +59,12 @@ export interface Vue<
5859
// Vue 2 only or shared
5960
readonly $el: Element
6061
readonly $refs: {
61-
[key: string]: Vue | Element | (Vue | Element)[] | undefined
62+
[key: string]:
63+
| Vue
64+
| Element
65+
| ComponentPublicInstance
66+
| (Vue | Element | ComponentPublicInstance)[]
67+
| undefined
6268
}
6369
readonly $slots: { [key: string]: VNode[] | undefined }
6470
readonly $scopedSlots: { [key: string]: NormalizedScopedSlot | undefined }

0 commit comments

Comments
 (0)