Skip to content

Commit 8ed3ed6

Browse files
feat(types/ide): support find definition for jsx tags, events (#3570)
1 parent 81e69b2 commit 8ed3ed6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/runtime-dom/types/jsx.d.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1296,10 +1296,8 @@ export interface Events {
12961296
onTransitionstart: TransitionEvent
12971297
}
12981298

1299-
type StringKeyOf<T> = Extract<keyof T, string>
1300-
13011299
type EventHandlers<E> = {
1302-
[K in StringKeyOf<E>]?: E[K] extends Function ? E[K] : (payload: E[K]) => void
1300+
[K in keyof E]?: E[K] extends Function ? E[K] : (payload: E[K]) => void
13031301
}
13041302

13051303
// use namespace import to avoid collision with generated types which use
@@ -1317,7 +1315,7 @@ type ReservedProps = {
13171315
type ElementAttrs<T> = T & ReservedProps
13181316

13191317
type NativeElements = {
1320-
[K in StringKeyOf<IntrinsicElementAttributes>]: ElementAttrs<
1318+
[K in keyof IntrinsicElementAttributes]: ElementAttrs<
13211319
IntrinsicElementAttributes[K]
13221320
>
13231321
}

0 commit comments

Comments
 (0)