@@ -50,15 +50,15 @@ export const isSymbol = (val: unknown): val is symbol => typeof val === 'symbol'
50
50
export const isObject = ( val : unknown ) : val is Record < any , any > =>
51
51
val !== null && typeof val === 'object'
52
52
53
- export function isPromise < T = any > ( val : unknown ) : val is Promise < T > {
53
+ export const isPromise = < T = any > ( val : unknown ) : val is Promise < T > = > {
54
54
return isObject ( val ) && isFunction ( val . then ) && isFunction ( val . catch )
55
55
}
56
56
57
57
export const objectToString = Object . prototype . toString
58
58
export const toTypeString = ( value : unknown ) : string =>
59
59
objectToString . call ( value )
60
60
61
- export function toRawType ( value : unknown ) : string {
61
+ export const toRawType = ( value : unknown ) : string => {
62
62
return toTypeString ( value ) . slice ( 8 , - 1 )
63
63
}
64
64
@@ -72,7 +72,7 @@ export const isReservedProp = /*#__PURE__*/ makeMap(
72
72
'onVnodeBeforeUnmount,onVnodeUnmounted'
73
73
)
74
74
75
- function cacheStringFunction < T extends ( str : string ) => string > ( fn : T ) : T {
75
+ const cacheStringFunction = < T extends ( str : string ) => string > ( fn : T ) : T => {
76
76
const cache : Record < string , string > = Object . create ( null )
77
77
return ( ( str : string ) => {
78
78
const hit = cache [ str ]
@@ -105,7 +105,7 @@ export const hasChanged = (value: any, oldValue: any): boolean =>
105
105
value !== oldValue && ( value === value || oldValue === oldValue )
106
106
107
107
// for converting {{ interpolation }} values to displayed strings.
108
- export function toDisplayString ( val : unknown ) : string {
108
+ export const toDisplayString = ( val : unknown ) : string => {
109
109
return val == null
110
110
? ''
111
111
: isArray ( val ) || ( isPlainObject ( val ) && val . toString === objectToString )
0 commit comments