bugsnag / webpack-bugsnag-plugins

Webpack plugins for common BugSnag actions.
MIT License
32 stars 29 forks source link

Add TypeScript type definitions #33

Closed skovy closed 5 years ago

skovy commented 5 years ago
skovy commented 5 years ago

@bengourley (looks like you're the primary maintainer?) let me know if you're open to including the types as part of the package, otherwise, I can move this PR to Definitely Typed. Thanks!

bengourley commented 5 years ago

Hey @skovy, thanks for the contribution!

I would recommend moving this PR to DefinitelyTyped. I honestly can't promise enough bandwidth to review this PR in a reasonable about of time, and then to maintain the types correctly for the lifetime of this module. If it becomes significantly burdensome to use this library with TypeScript, and it is painful for many people, we'd obviously reconsider. However, at this point your suggestion to land it in DefinitelyTyped and have the TS community maintain it seems like the option that will result in the best experience for developers who write their Webpack config in TypeScript.

I really appreciate your PR though, it's brought my attention to dtslint which I think would help over at @bugsnag/js where keeping the types in sync with the code is an ongoing problem. It looks like I essentially hand-rolled what dtslint does so would be better to delegate to a tool that hopefully does a better job!

skovy commented 5 years ago

@bengourley cool, makes sense 👍 - https://github.com/DefinitelyTyped/DefinitelyTyped/pull/35931