Post

📢 TypeScript 5.7 is here! Now with ✅ Better checks for uninitialized variables ✅ Smarter tsconfig lookup in editors ✅ Improved startup time ✅ Stricter checks for JSON imports ✅ Extension rewrites for relative imports and more! Try it today! devblogs.microsoft.com/typescript/a...

devblogs.microsoft.comAnnouncing TypeScript 5.7 - TypeScriptToday we excited to announce the availability of TypeScript 5.7! If you’re not familiar with TypeScript, it’s a language that builds on JavaScript by adding syntax for type declarations and annotation...

95 reposts346 likes

Honest question, must --target and --lib be in sync? Just from reading the docs I would have thought I could set lib to 2024 and target to 2022 and get to use new features while giving browsers the chance to catch up. If the two settings must be in sync, why isn’t it just a single setting?

They do not need to be in sync; sometimes they can't be. For example, not all versions of Node 20 support ES2022 syntax, but all support ES2023 runtime features. Often this happens when a specific syntax feature is buggy such that it should not be used, but unrelated lib stuff is okay.

Sounds reasonable! But then I find this paragraph from the blog post somewhat confusing “TypeScript 5.7 now supports --target es2024, which allows users to target ECMAScript 2024 runtimes. This target primarily enables specifying the new --lib es2024 which contains…” Emphasis on “enables”.

(Not to mention the people setting target=ES5 to downlevel let/const to var for performance, but I would argue that TypeScript is the wrong tool to do that job)

It's basically just vibes; we get a sense of how many little issues we have and try to get them all fixed for a patch. We only have one or two things fixed, but there are a couple of oopses that are left to be fixed. Certainly not this week, holidays and all