libxmljs2
libxmljs2 copied to clipboard
type() typings missing cdata and I believe wiki referencing dtd is incorrect.
HI,
I am investigating migration over from libxmljs to libxmljs2 when I noticed this difference between docs and typing information.
From the typings https://github.com/marudor/libxmljs2/blob/main/index.d.ts#L122 type(): 'comment' | 'element' | 'text' | 'attribute' | 'pi'; however the docs say https://github.com/marudor/libxmljs2/blob/main/index.d.ts#L122 node.type() returns The type of the node, current returns one of ('comment', 'element', 'text', 'attribute', 'dtd', 'cdata' or 'pi') .
Looks like there is a test that confirms cdata should be there https://github.com/marudor/libxmljs2/blob/main/test/text_node.test.js#L28.
However looking into how dtd behaves I don't believe its a valid return type.