refactor(types): mark internal API exports and exclude from d.ts

BREAKING CHANGE: Internal APIs are now excluded from type decalrations.
This commit is contained in:
Evan You
2020-04-30 17:04:35 -04:00
parent a5bb1d02b7
commit c9bf7ded2e
28 changed files with 209 additions and 96 deletions

View File

@@ -89,6 +89,9 @@ 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() : ''))
@@ -112,7 +115,10 @@ 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.
/**
* For converting {{ interpolation }} values to displayed strings.
* @internal
*/
export const toDisplayString = (val: unknown): string => {
return val == null
? ''