Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(types/tsx): allow ref_for type on tsx elements
  • Loading branch information
yyx990803 committed Jan 16, 2022
1 parent 5ac7030 commit 78df8c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/runtime-dom/types/jsx.d.ts
Expand Up @@ -1312,6 +1312,8 @@ type ReservedProps = {
| string
| RuntimeCore.Ref
| ((ref: Element | RuntimeCore.ComponentPublicInstance | null) => void)
ref_for?: boolean
ref_key?: string
}

type ElementAttrs<T> = T & ReservedProps
Expand Down
1 change: 1 addition & 0 deletions test-dts/defineComponent.test-d.tsx
Expand Up @@ -288,6 +288,7 @@ describe('with object props', () => {
key={'foo'}
// should allow ref
ref={'foo'}
ref_for={true}
/>
)

Expand Down

0 comments on commit 78df8c7

Please sign in to comment.