From: Amour1688 <31695475+Amour1688@users.noreply.github.com> Date: Tue, 25 Aug 2020 13:50:33 +0000 (+0800) Subject: types(jsx): make HTMLAttributes and SVGAttributes extend Events (#1941) X-Git-Tag: v3.0.0-rc.8~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a47626a4a3c7bee36c241dc12567dcc05a25f7e3;p=thirdparty%2Fvuejs%2Fcore.git types(jsx): make HTMLAttributes and SVGAttributes extend Events (#1941) --- diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index 0d767fc0e9..5d6bf20fbc 100644 --- a/packages/runtime-dom/types/jsx.d.ts +++ b/packages/runtime-dom/types/jsx.d.ts @@ -245,7 +245,7 @@ interface AriaAttributes { 'aria-valuetext'?: string } -export interface HTMLAttributes extends AriaAttributes { +export interface HTMLAttributes extends AriaAttributes, EventHandlers { 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 { innerHTML?: string /** @@ -1322,7 +1322,7 @@ type ReservedProps = { | ((ref: Element | RuntimeCore.ComponentInternalInstance | null) => void) } -type ElementAttrs = T & EventHandlers & ReservedProps +type ElementAttrs = T & ReservedProps type NativeElements = { [K in StringKeyOf]: ElementAttrs<