refactor(types): remove unnecessary as any (#1411)
This commit is contained in:
parent
81849d760b
commit
a60f3b1430
@ -278,7 +278,7 @@ function resolvePropValue(
|
||||
key: string,
|
||||
value: unknown
|
||||
) {
|
||||
const opt = options[key] as any
|
||||
const opt = options[key]
|
||||
if (opt != null) {
|
||||
const hasDefault = hasOwn(opt, 'default')
|
||||
// default values
|
||||
|
@ -408,11 +408,11 @@ export function cloneVNode<T, U>(
|
||||
vnode: VNode<T, U>,
|
||||
extraProps?: Data & VNodeProps
|
||||
): VNode<T, U> {
|
||||
const props = (extraProps
|
||||
const props = extraProps
|
||||
? vnode.props
|
||||
? mergeProps(vnode.props, extraProps)
|
||||
: extend({}, extraProps)
|
||||
: vnode.props) as any
|
||||
: vnode.props
|
||||
// This is intentionally NOT using spread or extend to avoid the runtime
|
||||
// key enumeration cost.
|
||||
return {
|
||||
@ -571,7 +571,7 @@ export function mergeProps(...args: (Data & VNodeProps)[]) {
|
||||
const incoming = toMerge[key]
|
||||
if (existing !== incoming) {
|
||||
ret[key] = existing
|
||||
? [].concat(existing as any, toMerge[key] as any)
|
||||
? [].concat(existing as any, toMerge[key])
|
||||
: incoming
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user