TypeScript 5.7 also has new compiler options. --rewriteRelativeImportExtensions
. If the import path is relative and is a TypeScript extension (.ts
, .tsx
, .mts
, .cts
) and if it is an undeclared file, the compiler will add the corresponding JavaScript extension (.js
, .jsx
, .mjs
, .cjs
). This allows you to write TypeScript code that is executable and can be compiled into JavaScript code when ready.
TypeScript 5.7 follows the September release of TypeScript 5.6 and includes a feature that disallows nullish and truey checks for constructs that never change nullish or truey.
Other features of TypeScript 5.7 include: