Skip to content

Commit 78df8c7

Browse files
committed
fix(types/tsx): allow ref_for type on tsx elements
1 parent 5ac7030 commit 78df8c7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/runtime-dom/types/jsx.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,8 @@ type ReservedProps = {
13121312
| string
13131313
| RuntimeCore.Ref
13141314
| ((ref: Element | RuntimeCore.ComponentPublicInstance | null) => void)
1315+
ref_for?: boolean
1316+
ref_key?: string
13151317
}
13161318

13171319
type ElementAttrs<T> = T & ReservedProps

test-dts/defineComponent.test-d.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ describe('with object props', () => {
288288
key={'foo'}
289289
// should allow ref
290290
ref={'foo'}
291+
ref_for={true}
291292
/>
292293
)
293294

0 commit comments

Comments
 (0)