How do we avoid this in the future?Īlpha/Beta graduation: You want to release previews of new APIs that are not ready for prime time yet. When you try to remove it, consumers complain that they're using it. How to avoid these oversights?Īccidental exports: You meant for your DrawHelper class to be kept internal, but one day you realize it's being exported. Things seem fine at first, but when a developer tries to call that function, they discover that there's no way to specify the DrawStyle. Missing exports: Suppose the awesome-widgets package exports an API function AwesomeButton.draw() that requires a parameter of type DrawStyle, but you forgot to export this enum. That would focus attention in the right place. But that proves unrealistic - nobody has time to look at every single PR! What you really need is a way to detect PRs that change API contracts, and flag them for review. To address this, you boldly propose that every awesome-widgets pull request must be approved by an experienced developer from your team. As developers start to depend on your library, you may encounter issues such as.Īccidental breaks: People keep reporting that their code won't compile after a supposedly "minor" update. Suppose for example that your company has published an NPM package called " awesome-widgets" that exports many classes and interfaces. Extractor helps you build better TypeScript library packages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |