DEV Community

loading...

npm displays badge for built-in TypeScript declarations

kais_blog profile image Kai ・1 min read

Good news for my fellow TypeScript developers!

Since the 16th of December, npm displays a small TS badge for packages with bundled TypeScript declarations:

npm displays packages with bundled TypeScript declarations
(example: https://www.npmjs.com/package/vue)

This makes it easier to know, whether the maintainer supports TypeScript and if you have to use a package from the @types repository.


Find GitHub's original announcement here: npm displays packages with bundled TypeScript declarations

Discussion (3)

pic
Editor guide
Collapse
bias profile image
Tobias Nickel

i think this is useful, but is it fair?
fair for example to the flow type system? could that also be displayed there? maybe microsoft adds more bedges. that would be nice.

by the way: I never used the flow declarations.

Collapse
kais_blog profile image
Kai Author

Afaik TypeScript is much more widespread. In this case, I think it could be considered fair. Just compare dev.to/t/typescript and dev.to/t/flow. Interest in TypeScript is probably much higher as well.

Besides, while more badges are surely interesting, it's always better to wait a bit before adding new stuff. It's hard to remove it later.

Collapse
patarapolw profile image
Pacharapol Withayasakpunt

Does it have to be fair?

Actually, TypeScript is not fair towards JSDoc types as well. TypeScript does have some degree of discrimination and lock in.