From: Evan You Date: Sat, 7 Sep 2019 15:45:32 +0000 (-0400) Subject: types: fix typing X-Git-Tag: v3.0.0-alpha.0~809 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02e9fe3f7ddc9ca0aebe4af3e32b4a75ab716830;p=thirdparty%2Fvuejs%2Fcore.git types: fix typing --- diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index bd398f05f6..1df7641aa6 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -45,7 +45,7 @@ export type VNodeChild = | VNodeChildAtom | VNodeChildren -export type NormalizedChildren = +export type NormalizedChildren = | string | VNodeChildren | RawSlots @@ -226,7 +226,7 @@ export function cloneVNode(vnode: VNode): VNode { } } -export function normalizeVNode(child: VNodeChild): 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 + vnode.children = children as NormalizedChildren vnode.shapeFlag |= type }