Skip to content

Commit

Permalink
fix(types): $refs can also contain ComponentPublicInstance (#12659)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilVerma committed Jul 15, 2022
1 parent e0a9546 commit fffbb9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion types/vue.d.ts
Expand Up @@ -14,6 +14,7 @@ import { VNode, VNodeData, VNodeChildren, NormalizedScopedSlot } from './vnode'
import { PluginFunction, PluginObject } from './plugin'
import { DefineComponent } from './v3-define-component'
import { nextTick } from './v3-generated'
import { ComponentPublicInstance } from 'v3-component-public-instance'

export interface CreateElement {
(
Expand Down Expand Up @@ -58,7 +59,12 @@ export interface Vue<
// Vue 2 only or shared
readonly $el: Element
readonly $refs: {
[key: string]: Vue | Element | (Vue | Element)[] | undefined
[key: string]:
| Vue
| Element
| ComponentPublicInstance
| (Vue | Element | ComponentPublicInstance)[]
| undefined
}
readonly $slots: { [key: string]: VNode[] | undefined }
readonly $scopedSlots: { [key: string]: NormalizedScopedSlot | undefined }
Expand Down

0 comments on commit fffbb9e

Please sign in to comment.