]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: fix internal exports from @vue/shared
authorEvan You <yyx990803@gmail.com>
Fri, 1 May 2020 13:19:30 +0000 (09:19 -0400)
committerEvan You <yyx990803@gmail.com>
Fri, 1 May 2020 13:19:30 +0000 (09:19 -0400)
packages/runtime-core/src/index.ts
packages/shared/src/index.ts

index 85efb5b0f98b5cbe9f5bc46da6e9adc3f6e04072..d8bf480bfff62cc873655a1e08f825fc5cd7ca08 100644 (file)
@@ -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
index 65197c851ba4cdc13fd2189f7bd4656b25bdca0c..8274c10de875648bdcfb8b585a201665394893e6 100644 (file)
@@ -89,9 +89,6 @@ const cacheStringFunction = <T extends (str: string) => 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
     ? ''