tXml
tXml copied to clipboard
tXml.d.ts
Should the type be
export type tNode = { tagName: string; attributes: object; children: (tNode | string | number)[]; };
?
strings do not get parsed automatically into numbers. did you find any number? and can share some example?
Maybe it's due to my poor typescript understanding but 'children' prop in tNode is like
children: ["aaaa", "bbbb"]
children: [
{tagName: "1111", attributes: {...}, children:[...]}
{tagName: "1111", attributes: {...}, children:[...]}
]
Currently tNode type declaration is
export type tNode = { tagName: string; attributes: object; children: tNode | string | number[]; };
Should 'children' always be array at least ? Or am I missing sth here... Thanks!
ahh, yes, the typedefinition should not contain the number. For the children as well as for the parser result. I will take that into the next 4.1 release. I already have one other change I want to release. Will do this at the weekend.
Thanks Tobias, tXml is such a great lib, the performance is outstanding! Really help our project a lot. Will dig a bit when time permitted :)