refactor(runtime-core): rename createAsyncComponent to defineAsyncComponent (#888)

BREAKING CHANGE: `createAsyncComponent` has been renamed to `defineAsyncComponent` for consistency with `defineComponent`.
This commit is contained in:
Cédric Exbrayat
2020-03-26 16:59:54 +01:00
committed by GitHub
parent 6a65739f61
commit ebc587376c
5 changed files with 38 additions and 38 deletions

View File

@@ -31,7 +31,7 @@ export interface AsyncComponentOptions<T = any> {
suspensible?: boolean
}
export function createAsyncComponent<
export function defineAsyncComponent<
T extends PublicAPIComponent = { new (): ComponentPublicInstance }
>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T {
if (isFunction(source)) {

View File

@@ -34,7 +34,7 @@ export {
export { provide, inject } from './apiInject'
export { nextTick } from './scheduler'
export { defineComponent } from './apiDefineComponent'
export { createAsyncComponent } from './apiAsyncComponent'
export { defineAsyncComponent } from './apiAsyncComponent'
// Advanced API ----------------------------------------------------------------