diff --git a/types/options.d.ts b/types/options.d.ts index 3475cb45bc4..07e6a10a91c 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -19,7 +19,7 @@ interface EsModuleComponent { export type AsyncComponent, Methods=DefaultMethods, Computed=DefaultComputed, Props=DefaultProps> = ( resolve: (component: Component) => void, reject: (reason?: any) => void -) => Promise | Component | void; +) => Promise | void; /** * When the `Computed` type parameter on `ComponentOptions` is inferred, diff --git a/types/test/options-test.ts b/types/test/options-test.ts index 5b79826d741..eb5003cce30 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -163,11 +163,6 @@ Vue.component('component', { createElement(() => Vue.component("component")), createElement(() => ( {} as ComponentOptions )), - createElement(() => { - return new Promise((resolve) => { - resolve({} as ComponentOptions); - }) - }), createElement((resolve, reject) => { resolve({} as ComponentOptions); reject(); diff --git a/types/vue.d.ts b/types/vue.d.ts index ddcdf992706..ae30d2cebb3 100644 --- a/types/vue.d.ts +++ b/types/vue.d.ts @@ -16,20 +16,8 @@ import { VNode, VNodeData, VNodeChildren, ScopedSlot } from "./vnode"; import { PluginFunction, PluginObject } from "./plugin"; export interface CreateElement { - // empty node - (): VNode; - - // element or component name - (tag: string, children: VNodeChildren): VNode; - (tag: string, data?: VNodeData, children?: VNodeChildren): VNode; - - // component constructor or options - (tag: Component, children: VNodeChildren): VNode; - (tag: Component, data?: VNodeData, children?: VNodeChildren): VNode; - - // async component - (tag: AsyncComponent, children: VNodeChildren): VNode; - (tag: AsyncComponent, data?: VNodeData, children?: VNodeChildren): VNode; + (tag?: string | Component | AsyncComponent, children?: VNodeChildren): VNode; + (tag?: string | Component | AsyncComponent, data?: VNodeData, children?: VNodeChildren): VNode; } export interface Vue {