oozcitak / xmlbuilder2

An XML builder for node.js
366 stars 36 forks source link

TS expose node interface #153

Closed ghost closed 1 year ago

ghost commented 1 year ago

Is your feature request related to a problem? Please describe. I'm using xmlbuilder2 in a node application for a SAML implementation, the Node implementation used by xmlbuilder2 differs from the available Node interface accessible through the dom types so it results in a type issue.

Describe the solution you'd like It would be helpful if the Node interface is exposed for use in node applications.

Describe alternatives you've considered I've considered casting, but that's an ugly mess I'd like to avoid since casting is prone to lead to errors.

Additional context

asportnoy commented 1 year ago

Not ideal, but you can use ReturnType<> on the create function (or one of the other ones) to get the type. Better than nothing though.

jkowalleck commented 1 year ago

i suppose this is caused by #165

universalhandle commented 1 year ago

@StefanSafeguard, I'm closing this issue as I believe it was addressed (though not in exactly the way you requested) in v3.1.1. Please reopen with a code snippet and/or more information if something further is required.