TypeScript 7.0 was released last week. https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
I have TypeScript 5.x installed globally on my laptop. Will performing
npm install -D typescript
break anything on my macOS Sequoia 15.7.7 and as well as my Window 11 laptops ?
Your question and your command don’t quite match.
This command ^ installs TypeScript locally into the current project as a dev dependency. It does not affect your globally installed TypeScript. If you meant to upgrade the global installation, you’d use npm install -g typescript.
Assuming your real question is whether upgrading to TypeScript 7 could break your existing projects, then yes, it might, but will depend on the project.
TypeScript 6.0 was intentionally released as a transition release. It introduced deprecations and changes that become hard errors in TypeScript 7, so it’s worth reviewing the breaking changes for both versions:
Disclaimer: I haven’t read those articles, I just Googled it for you.
Personally, I wouldn’t jump two major versions in one go. I’d upgrade to TypeScript 6 first, fix any deprecations or warnings, and then move to 7.
Also, the normal approach is to install and upgrade TypeScript on a per-project basis, with each project declaring its own TypeScript dependency. That lets each project stay on the version it has been tested with, and you can migrate them independently instead of changing the compiler for everything at once.
I meant -g - I copied the install code from microsoft’s blogpost and posted it here. Thanks for the reply. I guess I’ll stick to TSC 6 and for new projects TSC 7.