Support TypeScript 4.8
See original GitHub issuePrerequisites
- I confirm my issue is not in the opened issues
- I confirm the Frequently Asked Questions didn’t contain the answer to my issue
Environment check
- I’m using the latest
msw
version - I’m using Node.js version 14 or higher
Browsers
Chromium (Chrome, Brave, etc.), Firefox, Safari
Reproduction repository
N/A
Reproduction steps
N/A
Current behavior
When trying to update TypeScript to 4.8 (Just released today), we are warned that msw has a peerDependency range for typescript of >= 4.2.x <= 4.7.x
. As such, it’s a pain to force update TypeScript. There’s no reason that msw should restrict the maximum TypeScript version we can use in our projects.
Expected behavior
It looks like this can be traced to msw features that require a minimum TS version (eg: #429).
Two solutions:
- Easy quick fix: Specify a minimum TS version in the peerDependencies but no maximum version
- Better long-term fix: Use the package.json typesVersions field to specify different type declaration files depending on the version of TS that someone is running. So if msw wants to use a new feature, they can create a new version of the types which is only used by users with compatible TS versions installed.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Announcing TypeScript 4.8 - Microsoft Developer Blogs
TypeScript 4.8 brings a series of correctness and consistency improvements under --strictNullChecks . These changes affect how intersection ...
Read more >TypeScript 4.8 Support · Issue #5227 - GitHub
https://devblogs.microsoft.com/typescript/announcing-typescript-4-8-rc/ This issue is just to track all of the new features and their implementation state ...
Read more >What's New in TypeScript 4.8? - Better Programming
The TypeScript 4.8 version is planned to be released on the 23th of August . ... Build Improvements, better inference for Template String...
Read more >What's New in TypeScript 4.8 - Visual Studio Magazine
Microsoft released TypeScript 4.8 with a host of new features ranging from Find All References improvements to the ability to exclude ...
Read more >The Definitive TypeScript 4.8 Guide - SitePen
Our TypeScript style guide is regularly updated to provide new information about the latest versions of TypeScript, and provides an overview ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for this! At the very least I’ve learned a new perspective which is always valuable. Appreciate it!
Released: v0.46.0 🎉
This has been released in v0.46.0!
Make sure to always update to the latest version (
npm i msw@latest
) to get the newest features and bug fixes.Predictable release automation by @ossjs/release.