]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types(jsx): make HTMLAttributes and SVGAttributes extend Events (#1941)
authorAmour1688 <31695475+Amour1688@users.noreply.github.com>
Tue, 25 Aug 2020 13:50:33 +0000 (21:50 +0800)
committerGitHub <noreply@github.com>
Tue, 25 Aug 2020 13:50:33 +0000 (09:50 -0400)
packages/runtime-dom/types/jsx.d.ts

index 0d767fc0e941213fdff9b5436b919c627c625cd6..5d6bf20fbc8b1edaf79083615606c1229bef0dd5 100644 (file)
@@ -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<