Hi there, I might be mistaken but I could really use some help with this issue I'm facing:
Argument of type 'string | VNode' is not assignable to parameter of type 'VNode & string'. Type 'string' is not assignable to type 'VNode & string'. Type 'string' is not assignable to type 'VNode'.
It happens when I attempt to execute the following code:
addChild(child: VNode | string) {
this._children.push(child);
return 1
}
Here is the VNode Interface structure:
interface VNode {
readonly _tagName: string;
_attrs: {};
_children: VNode[] | string[];
}
I recently transitioned to TS and I might be making some mistakes, so any help would be greatly appreciated....