refactor(reactivity): reduce code of type check (#377)
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
isObject,
|
||||
isReservedProp,
|
||||
hasOwn,
|
||||
toTypeString,
|
||||
toRawType,
|
||||
PatchFlags,
|
||||
makeMap
|
||||
} from '@vue/shared'
|
||||
@@ -390,10 +390,6 @@ function styleValue(value: unknown, type: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
function toRawType(value: unknown): string {
|
||||
return toTypeString(value).slice(8, -1)
|
||||
}
|
||||
|
||||
function isExplicable(type: string): boolean {
|
||||
const explicitTypes = ['string', 'number', 'boolean']
|
||||
return explicitTypes.some(elem => type.toLowerCase() === elem)
|
||||
|
||||
Reference in New Issue
Block a user