diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 85efb5b0..d8bf480b 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -207,7 +207,20 @@ export { createCommentVNode, createStaticVNode } from './vnode' -export { toDisplayString, camelize } from '@vue/shared' + +// a bit of ceremony to mark these internal only here because we need to include +// them in @vue/shared's typings +import { toDisplayString, camelize } from '@vue/shared' +/** + * @internal + */ +const _toDisplayString = toDisplayString +/** + * @internal + */ +const _camelize = camelize +export { _toDisplayString as toDisplayString, _camelize as camelize } + // For integration with runtime compiler export { registerRuntimeCompiler } from './component' // For test-utils diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 65197c85..8274c10d 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -89,9 +89,6 @@ const cacheStringFunction = string>(fn: T): T => { } const camelizeRE = /-(\w)/g -/** - * @internal - */ export const camelize = cacheStringFunction( (str: string): string => { return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')) @@ -115,10 +112,7 @@ export const capitalize = cacheStringFunction( export const hasChanged = (value: any, oldValue: any): boolean => value !== oldValue && (value === value || oldValue === oldValue) -/** - * For converting {{ interpolation }} values to displayed strings. - * @internal - */ +// For converting {{ interpolation }} values to displayed strings. export const toDisplayString = (val: unknown): string => { return val == null ? ''