ClickThisNick
ClickThisNick

Reputation: 5250

Should typescript @types packages version match their non types packages?

Do @types use the same versioning as the untyped package?

npm i bluebird @types/bluebird -S gives me

"@types/bluebird": "^3.5.0",
"bluebird": "^3.5.0",

Seems pretty reasonable.

npm i request @types/request -S gives me

"@types/request": "0.0.41",
"request": "^2.81.0",

Now this scares me a bit. Does this mean that we only have request types for request version 0.0.41?

Upvotes: 14

Views: 2634

Answers (1)

basarat
basarat

Reputation: 276373

Should typescript @types packages version match their non types packages?

No. TypeScript types for JS packages is best effort and depends on

  • official js documentation (commonly lacking)
  • Community interest in the package

So version mismatches are fine as long as you are aware of their best effort nature.

Upvotes: 13

Related Questions