From e7e3eb8662f6f0161a67922be4055cf56ab8fa44 Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Mon, 28 Oct 2019 03:54:54 +0300 Subject: [PATCH] refactor(VNode): improve helper types (#392) --- packages/runtime-core/src/vnode.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/vnode.ts b/packages/runtime-core/src/vnode.ts index 98cdc021..25e80821 100644 --- a/packages/runtime-core/src/vnode.ts +++ b/packages/runtime-core/src/vnode.ts @@ -232,7 +232,10 @@ export function createVNode( return vnode } -export function cloneVNode(vnode: VNode, extraProps?: Data): VNode { +export function cloneVNode( + vnode: VNode, + extraProps?: Data +): VNode { // This is intentionally NOT using spread or extend to avoid the runtime // key enumeration cost. return { @@ -279,7 +282,7 @@ export function createCommentVNode( : createVNode(Comment, null, text) } -export function normalizeVNode(child: VNodeChild): VNode { +export function normalizeVNode(child: VNodeChild): VNode { if (child == null) { // empty placeholder return createVNode(Comment)