question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support TypeScript 4.8

See original GitHub issue

Prerequisites

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:closed
  • Created a year ago
  • Reactions:3
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
CreativeTechGuycommented, Aug 27, 2022

Thanks for this! At the very least I’ve learned a new perspective which is always valuable. Appreciate it!

1reaction
kettanaitocommented, Aug 31, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found