From ea4d833a4373cef6a69cd314ba062eed217eb9fd Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 16 Sep 2021 15:39:25 +0200 Subject: [PATCH] reuse ViewNode in Child type --- src/platform/web/ui/general/html.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/web/ui/general/html.ts b/src/platform/web/ui/general/html.ts index 1c51351f..9ebcfaaf 100644 --- a/src/platform/web/ui/general/html.ts +++ b/src/platform/web/ui/general/html.ts @@ -17,9 +17,11 @@ limitations under the License. // DOM helper functions +import {ViewNode} from "./types"; + export type ClassNames = { [className: string]: boolean | ((value: T) => boolean) } export type BasicAttributes = { [attribute: string]: ClassNames | boolean | string } -export type Child = string | Text | Element +export type Child = string | Text | ViewNode; export function isChildren(children: object | Child | Child[]): children is Child | Child[] { // children should be an not-object (that's the attributes), or a domnode, or an array