refactor(reactivity): reduce code of type check (#377)

This commit is contained in:
Junyan
2019-10-25 23:15:04 +08:00
committed by Evan You
parent a489f98a66
commit d76cfba7fb
3 changed files with 8 additions and 10 deletions

View File

@@ -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)