Open mperdikeas opened 2 years ago
xmlbuilder2/lib/interfaces
appears to be not public API, as it is not reachable from entry point.
Furthermore, it is a type, so you should use import type {XMLBuilder} from 'xmlbuilder2/lib/interfaces';
You might use import XMLBuilder from 'xmlbuilder2'
to get the public API accessible, which is properly typed.
Seconding this. It would be nice if xmlbuilder2 exported its types.
Describe the bug
I am using
xmlbuilder2
in Node writing my code in TypeScript. I am unsure what is the recommended / idiomatic way to import the typeXMLBuilder
which is defined innode_modules/xmlbuilder2/lib/interfaces.d.ts
To Reproduce Currently I am doing this:
This is working but it feels odd.
Expected behavior
I was expecting something more streamlined like:
Version:
Additional context None