]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: fix typing
authorEvan You <yyx990803@gmail.com>
Sat, 7 Sep 2019 15:45:32 +0000 (11:45 -0400)
committerEvan You <yyx990803@gmail.com>
Sat, 7 Sep 2019 15:45:32 +0000 (11:45 -0400)
packages/runtime-core/src/vnode.ts

index bd398f05f6aafcece3d0b037328e84b6997bf023..1df7641aa69bb91892d43380d8a16994024c6e00 100644 (file)
@@ -45,7 +45,7 @@ export type VNodeChild<HostNode = any, HostElement = any> =
   | VNodeChildAtom<HostNode, HostElement>
   | VNodeChildren<HostNode, HostElement>
 
-export type NormalizedChildren<HostNode, HostElement> =
+export type NormalizedChildren<HostNode = any, HostElement = any> =
   | string
   | VNodeChildren<HostNode, HostElement>
   | RawSlots
@@ -226,7 +226,7 @@ export function cloneVNode(vnode: VNode): VNode {
   }
 }
 
-export function normalizeVNode(child: VNodeChild<any, any>): VNode {
+export function normalizeVNode(child: VNodeChild): VNode {
   if (child == null) {
     // empty placeholder
     return createVNode(Empty)
@@ -258,7 +258,7 @@ export function normalizeChildren(vnode: VNode, children: unknown) {
     children = isString(children) ? children : children + ''
     type = ShapeFlags.TEXT_CHILDREN
   }
-  vnode.children = children as NormalizedChildren<any, any>
+  vnode.children = children as NormalizedChildren
   vnode.shapeFlag |= type
 }