[FIX] can use t-out with String classes

This commit is contained in:
Bruno Boi
2022-02-08 12:49:10 +01:00
committed by Aaron Bohy
parent 3196b585fd
commit cc8e11c9c9
4 changed files with 54 additions and 4 deletions
+3 -3
View File
@@ -9,11 +9,11 @@ const characterDataSetData = getDescriptor(characterDataProto, "data").set!;
const nodeRemoveChild = nodeProto.removeChild;
abstract class VSimpleNode {
text: string;
text: string | String;
parentEl?: HTMLElement | undefined;
el?: any;
constructor(text: string) {
constructor(text: string | String) {
this.text = text;
}
@@ -65,7 +65,7 @@ class VComment extends VSimpleNode {
patch() {}
}
export function text(str: string): VNode<VText> {
export function text(str: string | String): VNode<VText> {
return new VText(str);
}