Add deprecation schedule (#42834)

* Add deprecation schedule

and explain tags a bit more fully

* improved formatting
This commit is contained in:
Nathan Shively-Sanders
2020-03-04 15:39:36 -08:00
committed by GitHub
parent aac1184b61
commit 09dc238010
+24 -6
View File
@@ -64,25 +64,43 @@ If you still can't find it, check if it [bundles](http://www.typescriptlang.org/
This is usually provided in a `"types"` or `"typings"` field in the `package.json`,
or just look for any ".d.ts" files in the package and manually include them with a `/// <reference path="" />`.
#### Typescript 2.7 and earlier
#### Older versions of Typescript (2.7 and earlier)
Definitely Typed only tests packages on Typescript 2.8 and later as of November 2019.
Definitely Typed only tests packages on versions of Typescript that are less than 2 years old.
Currently versions 2.8 and above are tested.
If you're using Typescript 2.0 to 2.7, you can still try installing `@types` packages &mdash; the majority of packages don't use fancy new Typescript features.
But there's no guarantee that they'll work.
Packages that existed before November 2019 may have older versions that are explicitly marked compatible with older versions of Typescript; use the tag "ts2.6" for Typescript 2.6, for example.
Here is the support window:
For example, if you run `npm dist-tags @types/react`, you'll see the following table that shows that react@16.4 has types for Typescript 2.6:
Version | Released | End of Support
-- | -- | --
2.8 | March 2018 | March 2020
2.9 | May 2018 | May 2020
3.0 | July 2018 | July 2020
3.1 | September 2018 | September 2020
3.2 | November 2018 | November 2020
3.3 | January 2019 | January 2020
3.4 | March 2019 | March 2021
3.5 | May 2019 | May 2021
3.6 | August 2019 | August 2021
3.7 | November 2019 | November 2021
3.8 | February 2020 | February 2022
`@types` packages have tags for versions of Typescript that they explicitly support, so you can usually get older versions of packages that predate the 2-year window.
For example, if you run `npm dist-tags @types/react`, you'll see that Typescript 2.5 can use types for react@16.0, whereas Typescript 2.6 and 2.7 can use types for react@16.4:
|Tag | Version|
|----|---------|
|latest| 16.9.11|
|latest| 16.9.23|
|ts2.0| 15.0.1|
| ... | ... |
|ts2.5| 16.0.36|
|ts2.6| 16.4.7|
|ts2.7| 16.4.7|
| ... | ... |
### Typescript 1.8 and earlier
#### Typescript 1.*
* Manually download from the `master` branch of this repository and place them in your project
* ~~[Typings](https://github.com/typings/typings)~~ (use preferred alternatives, typings is deprecated)