diff --git a/types/options.d.ts b/types/options.d.ts index 3fe7a9b7aaf..4fe42e631c0 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -26,7 +26,7 @@ export type AsyncComponentPromise, Methods=DefaultMethod ) => Promise | void; export type AsyncComponentFactory, Methods=DefaultMethods, Computed=DefaultComputed, Props=DefaultProps> = () => { - component: AsyncComponentPromise; + component: Promise; loading?: Component | EsModuleComponent; error?: Component | EsModuleComponent; delay?: number; diff --git a/types/test/options-test.ts b/types/test/options-test.ts index 28060b7c817..4a62047baa6 100644 --- a/types/test/options-test.ts +++ b/types/test/options-test.ts @@ -477,5 +477,13 @@ Vue.component('functional-component-v-model', { } }); +Vue.component('async-component-factory', () => ({ + component: import('./es-module'), + loading: Vue.component(''), + error: Vue.component(''), + delay: 100, + timeout: 200 +})) + Vue.component('async-es-module-component', () => import('./es-module'))