diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index cd4133a9af1..f6383451633 100644 --- a/packages/runtime-dom/types/jsx.d.ts +++ b/packages/runtime-dom/types/jsx.d.ts @@ -1311,10 +1311,8 @@ export interface Events { onTransitionstart: TransitionEvent } -type StringKeyOf = Extract - type EventHandlers = { - [K in StringKeyOf]?: E[K] extends Function ? E[K] : (payload: E[K]) => void + [K in keyof E]?: E[K] extends Function ? E[K] : (payload: E[K]) => void } // use namespace import to avoid collision with generated types which use @@ -1332,7 +1330,7 @@ type ReservedProps = { type ElementAttrs = T & ReservedProps type NativeElements = { - [K in StringKeyOf]: ElementAttrs< + [K in keyof IntrinsicElementAttributes]: ElementAttrs< IntrinsicElementAttributes[K] > }