The official announcement reads, “Today we’re happy to announce the availability of TypeScript 3.4! TypeScript 3.4 introduces a new flag called –incremental which tells TypeScript to save information about the project graph from the last compilation. The next time TypeScript is invoked with –incremental, it will use that information to detect the least costly way to type-check and emit changes to your project, writes Daniel in a blog post.”
Here are five new features added in Typescript 3.4.
#1. Incremental flag
TypeScript saves information about the project graph from last compilation. TypeScript was able to reduce the subsequent builds of a project of the size of Visual Studio Code down to approximately a fifth of the original.
#2. Higher order type inference from generic functions
During type argument inference, TypeScript propagate type parameters from generic function arguments on to the resulting function type.
#3. ReadonlyArray and readonly tuples
The new version makes it easier to use read-only array-like types. It also acts as a syntax for ReadonlyArray. Any variable with reference to a ReadonlyArray cannot add, remove, or replace any elements of the array.
#4. Const Assertions
The new assertion favour immutability in the types inferred for literal expressions.
#5. Type-checking for globalThis
The new addition tries to offer a standard way for accessing the global scope, which is used across different environments.