-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
since htmlparser2@8 type declaration requires ts >= 4.5 #1242
Comments
I encountered the same problem |
I have added a note to the 8.0.0 release notes: https://github.com/fb55/htmlparser2/releases/tag/v8.0.0 The 7.x releases are still safe to use for users on older TypeScript versions, and I don't see a strong reason to maintain backwards compatibility for old TypeScript releases. Hope that makes sense! |
@fb55 Hi |
It is possible to use this module without TypeScript. If I added TypeScript as a peer dependency, users that don't use TypeScript would get errors. Unfortunately there is no way to specify optional peer dependencies. |
It looks like since #1165 landed in the repo, the bundled type declarations use mixed
exports
(exporting both type and values) which was introduced in TS 4.5 AFAIK.I am wondering if there's an assumption that the consumer of the package runs a specific version of TS since the [email protected] release line. I tried to use that library in a project that runs under TS 4.2 and the type checker errors out as it doesn't understand the mixed exports syntax. That's the kind of error that are being thrown:
Maybe we could add a note about the minimum TS requirement or provide backward compatible type declarations (relying on
typesVersion
and using a tool such asdownlevel-dts
).Thank you so much for your work on this awesome lib and hopefully this is useful feedback
The text was updated successfully, but these errors were encountered: