Skip to content

Commit a60f3b1

Browse files
authored
refactor(types): remove unnecessary as any (vuejs#1411)
1 parent 81849d7 commit a60f3b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/runtime-core/src/componentProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function resolvePropValue(
278278
key: string,
279279
value: unknown
280280
) {
281-
const opt = options[key] as any
281+
const opt = options[key]
282282
if (opt != null) {
283283
const hasDefault = hasOwn(opt, 'default')
284284
// default values

packages/runtime-core/src/vnode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,11 @@ export function cloneVNode<T, U>(
408408
vnode: VNode<T, U>,
409409
extraProps?: Data & VNodeProps
410410
): VNode<T, U> {
411-
const props = (extraProps
411+
const props = extraProps
412412
? vnode.props
413413
? mergeProps(vnode.props, extraProps)
414414
: extend({}, extraProps)
415-
: vnode.props) as any
415+
: vnode.props
416416
// This is intentionally NOT using spread or extend to avoid the runtime
417417
// key enumeration cost.
418418
return {
@@ -571,7 +571,7 @@ export function mergeProps(...args: (Data & VNodeProps)[]) {
571571
const incoming = toMerge[key]
572572
if (existing !== incoming) {
573573
ret[key] = existing
574-
? [].concat(existing as any, toMerge[key] as any)
574+
? [].concat(existing as any, toMerge[key])
575575
: incoming
576576
}
577577
} else {

0 commit comments

Comments
 (0)