mirror of https://github.com/vuejs/core.git
fix(types/tsx): allow ref_for type on tsx elements
This commit is contained in:
parent
5ac703055f
commit
78df8c78c4
|
@ -1312,6 +1312,8 @@ type ReservedProps = {
|
||||||
| string
|
| string
|
||||||
| RuntimeCore.Ref
|
| RuntimeCore.Ref
|
||||||
| ((ref: Element | RuntimeCore.ComponentPublicInstance | null) => void)
|
| ((ref: Element | RuntimeCore.ComponentPublicInstance | null) => void)
|
||||||
|
ref_for?: boolean
|
||||||
|
ref_key?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
type ElementAttrs<T> = T & ReservedProps
|
type ElementAttrs<T> = T & ReservedProps
|
||||||
|
|
|
@ -288,6 +288,7 @@ describe('with object props', () => {
|
||||||
key={'foo'}
|
key={'foo'}
|
||||||
// should allow ref
|
// should allow ref
|
||||||
ref={'foo'}
|
ref={'foo'}
|
||||||
|
ref_for={true}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue