]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(types): re-expose resolve asset utitlies and registerRuntimeCompiler in type...
authorEvan You <yyx990803@gmail.com>
Mon, 4 May 2020 12:52:59 +0000 (08:52 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 4 May 2020 12:52:59 +0000 (08:52 -0400)
close #1109

packages/runtime-core/src/component.ts
packages/runtime-core/src/helpers/resolveAssets.ts
packages/runtime-core/src/index.ts

index a26837bc869123a0b47fbaee134d444a72edbbc3..1cde644290bc0018b52067e72cdcca399c15427f 100644 (file)
@@ -549,7 +549,6 @@ let compile: CompileFunction | undefined
 /**
  * For runtime-dom to register the compiler.
  * Note the exported method uses any to avoid d.ts relying on the compiler types.
- * @internal
  */
 export function registerRuntimeCompiler(_compile: any) {
   compile = _compile
index b2db0adbe45667625244dc960e0e02a58e476498..f7118a88fc786c8137ed52fc349178ecd7cdd9e0 100644 (file)
@@ -12,18 +12,12 @@ import { warn } from '../warning'
 const COMPONENTS = 'components'
 const DIRECTIVES = 'directives'
 
-/**
- * @internal
- */
 export function resolveComponent(name: string): Component | string | undefined {
   return resolveAsset(COMPONENTS, name) || name
 }
 
 export const NULL_DYNAMIC_COMPONENT = Symbol()
 
-/**
- * @internal
- */
 export function resolveDynamicComponent(
   component: unknown
 ): Component | string | typeof NULL_DYNAMIC_COMPONENT {
@@ -35,9 +29,6 @@ export function resolveDynamicComponent(
   }
 }
 
-/**
- * @internal
- */
 export function resolveDirective(name: string): Directive | undefined {
   return resolveAsset(DIRECTIVES, name)
 }
index 86e9409053ae5bce3c15cba477936835d47a48a6..21d4df24f611a9a5999d95eb94ba2878f64f88fa 100644 (file)
@@ -81,6 +81,13 @@ export {
   callWithAsyncErrorHandling,
   ErrorCodes
 } from './errorHandling'
+export {
+  resolveComponent,
+  resolveDirective,
+  resolveDynamicComponent
+} from './helpers/resolveAssets'
+// For integration with runtime compiler
+export { registerRuntimeCompiler } from './component'
 export {
   useTransitionState,
   resolveTransitionHooks,
@@ -204,11 +211,6 @@ export { HMRRuntime } from './hmr'
 // For compiler generated code
 // should sync with '@vue/compiler-core/src/runtimeConstants.ts'
 export { withCtx } from './helpers/withRenderContext'
-export {
-  resolveComponent,
-  resolveDirective,
-  resolveDynamicComponent
-} from './helpers/resolveAssets'
 export { renderList } from './helpers/renderList'
 export { toHandlers } from './helpers/toHandlers'
 export { renderSlot } from './helpers/renderSlot'
@@ -236,8 +238,6 @@ const _toDisplayString = toDisplayString
 const _camelize = camelize
 export { _toDisplayString as toDisplayString, _camelize as camelize }
 
-// For integration with runtime compiler
-export { registerRuntimeCompiler } from './component'
 // For test-utils
 export { transformVNodeArgs } from './vnode'