|
@ -1,5 +1,5 @@ |
|
|
import Vue = require("../index"); |
|
|
import Vue = require("../index"); |
|
|
import { ComponentOptions, FunctionalComponentOptions } from "../index"; |
|
|
import { AsyncComponent, ComponentOptions, FunctionalComponentOptions } from "../index"; |
|
|
|
|
|
|
|
|
interface Component extends Vue { |
|
|
interface Component extends Vue { |
|
|
a: number; |
|
|
a: number; |
|
@ -206,11 +206,13 @@ Vue.component('functional-component', { |
|
|
} |
|
|
} |
|
|
} as FunctionalComponentOptions); |
|
|
} as FunctionalComponentOptions); |
|
|
|
|
|
|
|
|
Vue.component("async-component", (resolve, reject) => { |
|
|
Vue.component("async-component", ((resolve, reject) => { |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
resolve(Vue.component("component")); |
|
|
resolve(Vue.component("component")); |
|
|
}, 0); |
|
|
}, 0); |
|
|
return new Promise((resolve) => { |
|
|
return new Promise((resolve) => { |
|
|
resolve({ functional: true } as FunctionalComponentOptions); |
|
|
resolve({ functional: true } as FunctionalComponentOptions); |
|
|
}) |
|
|
}) |
|
|
}); |
|
|
}) as AsyncComponent); |
|
|
|
|
|
|
|
|
|
|
|
Vue.component('async-es-module-component', (() => import('./es-module')) as AsyncComponent) |
|
|