diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index ea09228e..21f91b9a 100644 --- a/packages/runtime-dom/types/jsx.d.ts +++ b/packages/runtime-dom/types/jsx.d.ts @@ -1296,10 +1296,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 @@ -1317,7 +1315,7 @@ type ReservedProps = { type ElementAttrs = T & ReservedProps type NativeElements = { - [K in StringKeyOf]: ElementAttrs< + [K in keyof IntrinsicElementAttributes]: ElementAttrs< IntrinsicElementAttributes[K] > }