|
|
@@ -1235,7 +1235,7 @@ export interface IntrinsicElementAttributes {
|
|
|
view: SVGAttributes
|
|
|
}
|
|
|
|
|
|
-export interface Events {
|
|
|
+export interface BaseEvents {
|
|
|
// clipboard events
|
|
|
onCopy: ClipboardEvent
|
|
|
onCut: ClipboardEvent
|
|
|
@@ -1351,6 +1351,12 @@ export interface Events {
|
|
|
onTransitionstart: TransitionEvent
|
|
|
}
|
|
|
|
|
|
+type EventModifiers = 'Capture' | 'Once' | `OnceCapture` | 'CaptureOnce'
|
|
|
+
|
|
|
+type Events = BaseEvents & {
|
|
|
+ [K in keyof BaseEvents as `${K & string}${EventModifiers}`]: BaseEvents[K]
|
|
|
+}
|
|
|
+
|
|
|
type EventHandlers<E> = {
|
|
|
[K in keyof E]?: E[K] extends (...args: any) => any
|
|
|
? E[K]
|