types: fix internal exports from @vue/shared
This commit is contained in:
parent
c9bf7ded2e
commit
127e96a993
@ -207,7 +207,20 @@ export {
|
|||||||
createCommentVNode,
|
createCommentVNode,
|
||||||
createStaticVNode
|
createStaticVNode
|
||||||
} from './vnode'
|
} 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
|
// For integration with runtime compiler
|
||||||
export { registerRuntimeCompiler } from './component'
|
export { registerRuntimeCompiler } from './component'
|
||||||
// For test-utils
|
// For test-utils
|
||||||
|
@ -89,9 +89,6 @@ const cacheStringFunction = <T extends (str: string) => string>(fn: T): T => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const camelizeRE = /-(\w)/g
|
const camelizeRE = /-(\w)/g
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
export const camelize = cacheStringFunction(
|
export const camelize = cacheStringFunction(
|
||||||
(str: string): string => {
|
(str: string): string => {
|
||||||
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
|
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
|
||||||
@ -115,10 +112,7 @@ export const capitalize = cacheStringFunction(
|
|||||||
export const hasChanged = (value: any, oldValue: any): boolean =>
|
export const hasChanged = (value: any, oldValue: any): boolean =>
|
||||||
value !== oldValue && (value === value || oldValue === oldValue)
|
value !== oldValue && (value === value || oldValue === oldValue)
|
||||||
|
|
||||||
/**
|
// For converting {{ interpolation }} values to displayed strings.
|
||||||
* For converting {{ interpolation }} values to displayed strings.
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
export const toDisplayString = (val: unknown): string => {
|
export const toDisplayString = (val: unknown): string => {
|
||||||
return val == null
|
return val == null
|
||||||
? ''
|
? ''
|
||||||
|
Loading…
Reference in New Issue
Block a user