From 0faae8ebf7f8e4c3cab38ef35ffd4a814b811c7b Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Fri, 15 May 2015 13:00:47 -0500 Subject: [PATCH] Collapse createChildren and rename as 'VChild' --- virtual-dom/virtual-dom.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/virtual-dom/virtual-dom.d.ts b/virtual-dom/virtual-dom.d.ts index 70166515f..7023d38fd 100644 --- a/virtual-dom/virtual-dom.d.ts +++ b/virtual-dom/virtual-dom.d.ts @@ -86,7 +86,8 @@ declare module VirtualDOM { key?: string; namespace?: string; } - type createChildren = Array; + + type VChild = VTree[] | VTree | string[] | string; /** create() calls either document.createElement() or document.createElementNS(), @@ -94,8 +95,8 @@ declare module VirtualDOM { */ function create(vnode: VText, opts?: {document?: Document, warn?: boolean}): Text; function create(vnode: VNode | Widget | Thunk, opts?: {document?: Document, warn?: boolean}): Element; - function h(tagName: string, properties: createProperties, ...children: createChildren): VNode; - function h(tagName: string, ...children: createChildren): VNode; + function h(tagName: string, properties: createProperties, ...children: VChild[]): VNode; + function h(tagName: string, ...children: VChild[]): VNode; function diff(left: VTree, right: VTree): VPatch[]; /** patch() usually just returns rootNode after doing stuff to it, so we want