TS declaration file introduces breaking change
See original GitHub issueThe included https://github.com/cryptocoinjs/base-x/blob/master/src/index.d.ts differs from the one at https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/base-x/index.d.ts, which means, this introduces a breaking change.
Other packages (like bs58) use ^3.0.2
as their version string for this package, which will install 3.0.6 and break, because the other package doesn’t expect such a breaking change in a patch release.
I would suggest unpublishing v3.0.6 and republishing it as 4.0.0, or overwriting v3.0.6 with the type definition of DefinitelyTyped.
Another more complicated option would be to overwrite 3.0.6 with 3.0.5 and republishing the package with your new typescript declaration under 4.0.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Breaking Changes · microsoft/TypeScript Wiki - GitHub
TypeScript now shows JavaScript syntax and binding errors in your file, such as using incorrect modifiers, duplicate declarations, and more.
Read more >Documentation - Modules .d.ts - TypeScript
Note that using export default in your .d.ts files requires ... Add the template inside the braces of the declare module, and see...
Read more >Is adding a d.ts file to a JavaScript npm package a breaking ...
SemVer states. Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes,; MINOR version ...
Read more >Semantic Versioning for TypeScript Types
This is a breaking change for value exports ( let , const , class , function ) independent of types, but removing exported...
Read more >Announcing TypeScript 4.2 - Microsoft Developer Blogs
Likewise, if we get the declaration file output ( .d.ts output) for ... TypeScript 4.2 contains some breaking changes, but we believe they ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is weird… the results are not consistent for me.
Running with
--traceResolution
shows that it’s picking up both… and I don’t know what causes it to choose one over the other.Your repro steps did fail to build, though. If I try doing things like remove base-x as a direct dependency to your repo, or use npm run scripts instead of the command directly it was working and not working intermittently… removing strict also made it work, then adding strict back and it still worked.
it is very wonky… but imo, we should be the ones to manage the type definitions. I have a PR on bs58 and will consider doing something similar for bs58check.
What were the steps you did, where typescript is trying to resolve the conflict of multiple types and uses the DefinetelyTyped ones?