mirror of https://github.com/vuejs/core.git
fix(types): more precise types for Events and added missing definitions (#9675)
This commit is contained in:
parent
c4a88cdd0d
commit
8bb8fb2362
|
@ -430,7 +430,6 @@ export interface DataHTMLAttributes extends HTMLAttributes {
|
||||||
export interface DetailsHTMLAttributes extends HTMLAttributes {
|
export interface DetailsHTMLAttributes extends HTMLAttributes {
|
||||||
name?: string | undefined
|
name?: string | undefined
|
||||||
open?: Booleanish | undefined
|
open?: Booleanish | undefined
|
||||||
onToggle?: ((payload: ToggleEvent) => void) | undefined
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DelHTMLAttributes extends HTMLAttributes {
|
export interface DelHTMLAttributes extends HTMLAttributes {
|
||||||
|
@ -441,6 +440,7 @@ export interface DelHTMLAttributes extends HTMLAttributes {
|
||||||
export interface DialogHTMLAttributes extends HTMLAttributes {
|
export interface DialogHTMLAttributes extends HTMLAttributes {
|
||||||
open?: Booleanish | undefined
|
open?: Booleanish | undefined
|
||||||
onClose?: ((payload: Event) => void) | undefined
|
onClose?: ((payload: Event) => void) | undefined
|
||||||
|
onCancel?: ((payload: Event) => void) | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EmbedHTMLAttributes extends HTMLAttributes {
|
export interface EmbedHTMLAttributes extends HTMLAttributes {
|
||||||
|
@ -581,6 +581,7 @@ export interface InputHTMLAttributes extends HTMLAttributes {
|
||||||
type?: InputTypeHTMLAttribute | undefined
|
type?: InputTypeHTMLAttribute | undefined
|
||||||
value?: any // we support :value to be bound to anything w/ v-model
|
value?: any // we support :value to be bound to anything w/ v-model
|
||||||
width?: Numberish | undefined
|
width?: Numberish | undefined
|
||||||
|
onCancel?: ((payload: Event) => void) | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KeygenHTMLAttributes extends HTMLAttributes {
|
export interface KeygenHTMLAttributes extends HTMLAttributes {
|
||||||
|
@ -1327,11 +1328,16 @@ export interface Events {
|
||||||
// form events
|
// form events
|
||||||
onChange: Event
|
onChange: Event
|
||||||
onBeforeinput: InputEvent
|
onBeforeinput: InputEvent
|
||||||
onInput: Event
|
onFormdata: FormDataEvent
|
||||||
|
onInput: InputEvent
|
||||||
onReset: Event
|
onReset: Event
|
||||||
onSubmit: SubmitEvent
|
onSubmit: SubmitEvent
|
||||||
onInvalid: Event
|
onInvalid: Event
|
||||||
|
|
||||||
|
// fullscreen events
|
||||||
|
onFullscreenchange: Event
|
||||||
|
onFullscreenerror: Event
|
||||||
|
|
||||||
// image events
|
// image events
|
||||||
onLoad: Event
|
onLoad: Event
|
||||||
onError: Event
|
onError: Event
|
||||||
|
@ -1342,9 +1348,6 @@ export interface Events {
|
||||||
onKeyup: KeyboardEvent
|
onKeyup: KeyboardEvent
|
||||||
|
|
||||||
// mouse events
|
// mouse events
|
||||||
onAuxclick: PointerEvent
|
|
||||||
onClick: PointerEvent
|
|
||||||
onContextmenu: PointerEvent
|
|
||||||
onDblclick: MouseEvent
|
onDblclick: MouseEvent
|
||||||
onMousedown: MouseEvent
|
onMousedown: MouseEvent
|
||||||
onMouseenter: MouseEvent
|
onMouseenter: MouseEvent
|
||||||
|
@ -1392,6 +1395,11 @@ export interface Events {
|
||||||
onTouchstart: TouchEvent
|
onTouchstart: TouchEvent
|
||||||
|
|
||||||
// pointer events
|
// pointer events
|
||||||
|
onAuxclick: PointerEvent
|
||||||
|
onClick: PointerEvent
|
||||||
|
onContextmenu: PointerEvent
|
||||||
|
onGotpointercapture: PointerEvent
|
||||||
|
onLostpointercapture: PointerEvent
|
||||||
onPointerdown: PointerEvent
|
onPointerdown: PointerEvent
|
||||||
onPointermove: PointerEvent
|
onPointermove: PointerEvent
|
||||||
onPointerup: PointerEvent
|
onPointerup: PointerEvent
|
||||||
|
@ -1401,16 +1409,26 @@ export interface Events {
|
||||||
onPointerover: PointerEvent
|
onPointerover: PointerEvent
|
||||||
onPointerout: PointerEvent
|
onPointerout: PointerEvent
|
||||||
|
|
||||||
|
// popover events
|
||||||
|
onBeforetoggle: ToggleEvent
|
||||||
|
onToggle: ToggleEvent
|
||||||
|
|
||||||
// wheel events
|
// wheel events
|
||||||
onWheel: WheelEvent
|
onWheel: WheelEvent
|
||||||
|
|
||||||
// animation events
|
// animation events
|
||||||
|
onAnimationcancel: AnimationEvent
|
||||||
onAnimationstart: AnimationEvent
|
onAnimationstart: AnimationEvent
|
||||||
onAnimationend: AnimationEvent
|
onAnimationend: AnimationEvent
|
||||||
onAnimationiteration: AnimationEvent
|
onAnimationiteration: AnimationEvent
|
||||||
|
|
||||||
|
// security policy events
|
||||||
|
onSecuritypolicyviolation: SecurityPolicyViolationEvent
|
||||||
|
|
||||||
// transition events
|
// transition events
|
||||||
|
onTransitioncancel: TransitionEvent
|
||||||
onTransitionend: TransitionEvent
|
onTransitionend: TransitionEvent
|
||||||
|
onTransitionrun: TransitionEvent
|
||||||
onTransitionstart: TransitionEvent
|
onTransitionstart: TransitionEvent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue