catch statements for errors as well as compiler improvements.
The catch binding parameters capability in TypeScript 2.5 uses a late-stage ECMAScript feature to make catch binding optional in
catch statements. Making catch binding optional “means we can just omit
unusedError altogether,” said Daniel Rosenwasser, Microsoft’s program manager for TypeScript. The reason for that is there are times when developers expect something might fail by throwing an error, but the developer does not care what the error is.
Also featured in TypeScript 2.5:
- Support for imports when using the Node module-resolution strategy. The compiler checks whether files originate from “identical” packages. If a file was derived from a package with a package.json containing name and version fields identical to a previously encountered package, TypeScript will redirect to the top-most package. This resolves a situation in which two packages might have identical declaration of classes but contain “private” members that make them structurally incompatible. A side effect of this change is reduction in memory and the runtime footprint of the compiler and language service.
preserveSymlinkscompiler flag, which is like to the
–preserveSymlinksflag in Node.js that instructs the module loader to preserve symbolic links when resolving and caching modules.
Other features being considered for future TypeScipt versions include improvements to the TypeScript
–watch mode and integration with other tools that have a file-watching capability. The intent is to ensure that as code bases grow larger, TypeScript offers fast turnaround between the time that a file is saved and the time to load a project.
The TypeScript 2.5 release candidate is available through NuGet and through NPM via
npm install -g typescript@rc.