Skip to content

re: TypeScript libraries with incorrectly typed members VIEW POST

re: You can also write definition files (.d.ts) as described in the typescript documentation. That way you don't clutter your own files with definition...

Do you mean rewriting the 3rd party library's definition file or creating an additional one?


Yes. These definitions aren't actually part of the 3rd party library anyway, but they are developed separately at for example.

Right, I'm familiar with definitelytyped (though they don't have typings for the framework mentioned in this post).

By "yes" do you mean writing a supplementary definitions file or do you mean editing the one pulled from definitelytyped?

Well, I hope every TS developer is joining the effort to provide definition files for everything at central repositories like definitelytyped. So I always start looking there for an existing one and update it if necessary. If none exists I write it myself... and send it to definitelytyped when it's complete and tested successfully.

Supplementary files are a bad idea. Are people really that afraid of pull requests? Withholding fixes does not only thwart the idea of open source, but it's also a technical debt in a project. Major upgrades of 3rd party libraries can already be a pain, but they're even worse if you need to upgrade your private fixes for the 3rd party libraries, too.

code of conduct - report abuse