Microsoft’s strongly typed JavaScript is now in the release candidate stage, featuring error reporting for variables that were never initialized. Credit: Roman Samborskyi / Shutterstock TypeScript 5.7, the latest planned release of Microsoft’s JavaScript variant with syntax for types, has moved to the release candidate stage. With version 5.7, the language’s type system is now able to report errors when variables have never been initialized. The release candidate was introduced November 8 following an October 9 beta. It can be accessed through NPM using the command: npm install -D typescript@rc. With checks for never-initialized variables, the TypeScript team has addressed a situation where TypeScript’s checks for non-initialized variables did not always work. For example, if the not-yet-initialized variable was accessed in a separate function, the type system did not know when the function would be called; it would instead take an optimistic view that the variable would be initialized. While TypeScript 5.7 remains lenient on variables that may have been initialized, the type system now can report errors when variables were never initialized at all. Also in TypeScript 5.7 is a new compiler option, --rewriteRelativeImportExtensions. When an import path is relative and ends with a TypeScript extension (.ts, .tsx, .mts, .cts), and it is a non-declaration file, the compiler will rewrite the path to the corresponding JavaScript extension (.js, .jsx, .mjs, .cjs). This allows for writing TypeScript code that can be run in place and be compiled into JavaScript code when ready. TypeScript 5.7 comes on the heels of the September release of TypeScript 5.6, with capabilities including disallowing nullish and truthy checks on syntax that never varies on nullishness or truthiness. Other features in TypeScript 5.7 include the following: TypeScript 5.7 supports --target es2024, which allows developers to target ECMAScript 2024 runtimes. TypeScript 5.7 supports V8 compile caching in Node.js. TypeScript now has a more consistent behavior for methods in classes when these are declared with non-literal computed property names. When a function expression is contextually typed by a signature returning a generic type, TypeScript now appropriately provides an implicit any error under noImplicitAny but outside of strictNullChecks. When a TypeScript file is loaded in an editor using TSServer (like Visual Studio or Visual Studio Code), the editor will try to find the relevant tsconfig.json file that “owns” the file. When importing from a .json file under --module nodenext, TypeScript will now enforce certain rules to prevent runtime errors. Related content news Go language evolving for future hardware, AI workloads The Go team is working to adapt Go to large multicore systems, the latest hardware instructions, and the needs of developers of large-scale AI systems. By Paul Krill Nov 15, 2024 3 mins Google Go Generative AI Programming Languages analysis And the #1 Python IDE is . . . PyCharm, VS Code, and five other popular Python IDEs duke it out. Which one do you think takes home the prize? By Serdar Yegulalp Nov 15, 2024 2 mins Python Programming Languages Software Development news JDK 24: The new features in Java 24 21 features are proposed for the next version of Java including quantum-resistant cryptographic keys designed to secure Java apps against future quantum computing attacks. By Paul Krill Nov 15, 2024 11 mins Java Programming Languages Software Development news Rust Foundation moves forward on C++ and Rust interoperability Problem statement released to address the challenges to making cross-language development with C++ and Rust more accessible and approachable. By Paul Krill Nov 14, 2024 2 mins C++ Rust Programming Languages Resources Videos