
Additionally featured in TypeScript 6.0 is assist for the es2025 choice for each goal and lib, much less context sensitivity on this-less features, and new sorts for Temporal, which give normal objects and features for working with dates and occasions. With the --stableTypeOrdering flag, the sort ordering habits of TypeScript 6.0 matches that of TypeScript 7.0, decreasing the variety of variations between the 2 codebases. Microsoft doesn’t essentially encourage utilizing this flag on a regular basis as it might add a considerable slowdown to sort checking (as much as 25% relying on the codebase).
With TypeScript 6.0’s es2025, choice, the brand new goal provides new sorts for built-in APIs (e.g. RegExp.escape) and strikes just a few declarations from esnext into es2025. With this-less features, if this isn’t truly utilized in a operate, then it’s not thought of contextually delicate. Which means these features will probably be seen as greater precedence in the case of sort inference. For Temporal, the long-awaited ECMAScript Temporal proposal has reached stage 3 and is anticipated to be added to JavaScript within the close to future, Rosenwasser stated. TypeScript 6.0 now contains built-in sorts for the Temporal API, so builders can begin utilizing it in TypeScript code by way of --target esnext or "lib": ["esnext"] or the extra granular temporal.esnext.
Different new options and enhancements in TypeScript 6.0:

