types(jsx): make HTMLAttributes and SVGAttributes extend Events (#1941)
This commit is contained in:
parent
1d55454e61
commit
a47626a4a3
6
packages/runtime-dom/types/jsx.d.ts
vendored
6
packages/runtime-dom/types/jsx.d.ts
vendored
@ -245,7 +245,7 @@ interface AriaAttributes {
|
||||
'aria-valuetext'?: string
|
||||
}
|
||||
|
||||
export interface HTMLAttributes extends AriaAttributes {
|
||||
export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
||||
innerHTML?: string
|
||||
|
||||
class?: any
|
||||
@ -734,7 +734,7 @@ export interface WebViewHTMLAttributes extends HTMLAttributes {
|
||||
webpreferences?: string
|
||||
}
|
||||
|
||||
export interface SVGAttributes extends AriaAttributes {
|
||||
export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
|
||||
innerHTML?: string
|
||||
|
||||
/**
|
||||
@ -1322,7 +1322,7 @@ type ReservedProps = {
|
||||
| ((ref: Element | RuntimeCore.ComponentInternalInstance | null) => void)
|
||||
}
|
||||
|
||||
type ElementAttrs<T> = T & EventHandlers<Events> & ReservedProps
|
||||
type ElementAttrs<T> = T & ReservedProps
|
||||
|
||||
type NativeElements = {
|
||||
[K in StringKeyOf<IntrinsicElementAttributes>]: ElementAttrs<
|
||||
|
Loading…
Reference in New Issue
Block a user