Avatar ·

How to update TypeScript to the latest version using npm?

Hi everyone! I'm a beginner developer and recently started learning TypeScript. I have an issue: I installed TypeScript globally via npm some time ago, but now I need to update it to the latest version to use new features, such as template literal types or improved module support. Here's what I've already tried: 1. Ran `npm update -g typescript` — but the version didn't change, it remained at 4.5.0. 2. Tried `npm install -g typescript@latest` — the installation seemed to go through, but when I check the version via `tsc --version`, I still see the old one. 3. I also checked if TypeScript is installed locally in the project — there's `typescript@4.2.0` there, and I want to update that as well. My code: ```typescript // Old code that works function greet(name: