rollbar.js icon indicating copy to clipboard operation
rollbar.js copied to clipboard

Distribute TypeScript declaration file as a package

Open RudeySH opened this issue 6 years ago • 5 comments

I appreciate that this repo includes a TypeScript declaration file (*.d.ts), many libraries don't do this. Thanks!

However, I would like to see this being taken one step further, and have the file distributed through package managers. Currently, I have to copy your declaration file to my projects to be able to use it. Typically, libraries distribute this file along with (npm) packages to prevent folks from having to manually copy it.

It would be even better if the declaration file was submitted to DefinitelyTyped.

RudeySH avatar May 25 '19 23:05 RudeySH

@RudeySH Great idea. I'll try to get this in the next release.

waltjones avatar May 28 '19 18:05 waltjones

DefinitelyTyped is for packages that DON'T maintain their own typings.

It shouldn't be a separate package. They should have the .d.ts file inside the package and have the "types" package.json property point to that file

tommck avatar Nov 06 '19 19:11 tommck

@tommck Noted. Thank you!

waltjones avatar Nov 06 '19 19:11 waltjones

Hello, any news on this issue?

I can help if you want 😃

EDIT: It seams that the typing is now included in the package, so probably this issue need to be close?

spontoreau avatar Feb 11 '20 15:02 spontoreau

@waltjones @tommck rollbar.js can be included into project differently not only with npm package. So separate DefinitelyTyped package for types can be useful for others who don't use rollbar npm package. For example in our project minified prod ready rollbar.js is injected by ruby gem. If we would use full rollbar npm package only for types it would be very confusing.

aleksandrlat avatar Mar 13 '20 18:03 aleksandrlat