Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type AsyncComponentPromise<Data=DefaultData<never>, Methods=DefaultMethod
) => Promise<Component | EsModuleComponent> | void;

export type AsyncComponentFactory<Data=DefaultData<never>, Methods=DefaultMethods<never>, Computed=DefaultComputed, Props=DefaultProps> = () => {
component: AsyncComponentPromise<Data, Methods, Computed, Props>;
component: Promise<Component | EsModuleComponent>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as @pikax noted, Data, Methods,... are not used anymore. Maybe we should pass them to Component

loading?: Component | EsModuleComponent;
error?: Component | EsModuleComponent;
delay?: number;
Expand Down
8 changes: 8 additions & 0 deletions types/test/options-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))