Skip to content

Commit 127e96a

Browse files
committed
types: fix internal exports from @vue/shared
1 parent c9bf7de commit 127e96a

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

packages/runtime-core/src/index.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,20 @@ export {
207207
createCommentVNode,
208208
createStaticVNode
209209
} from './vnode'
210-
export { toDisplayString, camelize } from '@vue/shared'
210+
211+
// a bit of ceremony to mark these internal only here because we need to include
212+
// them in @vue/shared's typings
213+
import { toDisplayString, camelize } from '@vue/shared'
214+
/**
215+
* @internal
216+
*/
217+
const _toDisplayString = toDisplayString
218+
/**
219+
* @internal
220+
*/
221+
const _camelize = camelize
222+
export { _toDisplayString as toDisplayString, _camelize as camelize }
223+
211224
// For integration with runtime compiler
212225
export { registerRuntimeCompiler } from './component'
213226
// For test-utils

packages/shared/src/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ const cacheStringFunction = <T extends (str: string) => string>(fn: T): T => {
8989
}
9090

9191
const camelizeRE = /-(\w)/g
92-
/**
93-
* @internal
94-
*/
9592
export const camelize = cacheStringFunction(
9693
(str: string): string => {
9794
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
@@ -115,10 +112,7 @@ export const capitalize = cacheStringFunction(
115112
export const hasChanged = (value: any, oldValue: any): boolean =>
116113
value !== oldValue && (value === value || oldValue === oldValue)
117114

118-
/**
119-
* For converting {{ interpolation }} values to displayed strings.
120-
* @internal
121-
*/
115+
// For converting {{ interpolation }} values to displayed strings.
122116
export const toDisplayString = (val: unknown): string => {
123117
return val == null
124118
? ''

0 commit comments

Comments
 (0)