diff --git a/packages/dts-test/h.test-d.ts b/packages/dts-test/h.test-d.ts index a199e14ced9..8f381c90ec9 100644 --- a/packages/dts-test/h.test-d.ts +++ b/packages/dts-test/h.test-d.ts @@ -11,7 +11,7 @@ import { ref, resolveComponent, } from 'vue' -import { describe, expectAssignable, expectType } from './utils' +import { describe, expectAssignable /*, expectType */ } from './utils' describe('h inference w/ element', () => { // key @@ -35,16 +35,17 @@ describe('h inference w/ element', () => { const slots = { default: () => {} } // RawSlots h('div', {}, slots) // events - h('div', { - onClick: e => { - expectType(e) - }, - }) - h('input', { - onFocus(e) { - expectType(e) - }, - }) + // fixed by xxxxxx + // h('div', { + // onClick: e => { + // expectType(e) + // }, + // }) + // h('input', { + // onFocus(e) { + // expectType(e) + // }, + // }) }) describe('h inference w/ Fragment', () => { diff --git a/packages/runtime-core/src/h.ts b/packages/runtime-core/src/h.ts index 93e7fd9bc88..eec0f6551ba 100644 --- a/packages/runtime-core/src/h.ts +++ b/packages/runtime-core/src/h.ts @@ -75,25 +75,27 @@ interface Constructor

{ new (...args: any[]): { $props: P } } -type HTMLElementEventHandler = { - [K in keyof HTMLElementEventMap as `on${Capitalize}`]?: ( - ev: HTMLElementEventMap[K], - ) => any -} +// fixed by xxxxxx +// type HTMLElementEventHandler = { +// [K in keyof HTMLElementEventMap as `on${Capitalize}`]?: ( +// ev: HTMLElementEventMap[K], +// ) => any +// } // The following is a series of overloads for providing props validation of // manually written render functions. // element -export function h( - type: K, - children?: RawChildren, -): VNode -export function h( - type: K, - props?: (RawProps & HTMLElementEventHandler) | null, - children?: RawChildren | RawSlots, -): VNode +// fixed by xxxxxx +// export function h( +// type: K, +// children?: RawChildren, +// ): VNode +// export function h( +// type: K, +// props?: (RawProps & HTMLElementEventHandler) | null, +// children?: RawChildren | RawSlots, +// ): VNode // custom element export function h(type: string, children?: RawChildren): VNode