Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make external interfaces compatible with xmldom #138

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Make external interfaces compatible with xmldom #138

wants to merge 4 commits into from

Conversation

tmcw
Copy link
Collaborator

@tmcw tmcw commented Feb 15, 2025

This resolves two fairly long-standing issues. It does two things:

  1. Removes @types/geojson and @xmldom/xmldom as peerDependencies. If you want to use them and their types with TypeScript, you install those packages separately.
  2. Adds a union type for all Document parameters that go into the module to signal compatibility with xmldom.

@tmcw
Copy link
Collaborator Author

tmcw commented Feb 15, 2025

This doesn't work, if xmldom is not available, then this lets the methods accept any.

@tmcw
Copy link
Collaborator Author

tmcw commented Feb 15, 2025

If anyone knows the answer here, let me know: is it possible to expose an index.d.ts file that tries to use types from an optional dependency, but if that module is not present, treats its types as never?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible type with xmldoc Why is @types/geojson a required dependency?
1 participant