TypeScript 3.8 Arrives

3.8 introduces many new useful features, including new or upcoming ECMAScript standards features and new syntax for importing/exporting only types.

Microsoft has released the latest version-3.8 of TypeScript.
 
Well, TypeScript is a language that adds syntax for types on top of JavaScript which can be investigated through a process called static type-checking. This type-checking enables you to find out about errors like typos and values that are potentially null and undefined before you even run your code.
 
Key features and updates in 3.8 includes:
  • Type-Only Imports and Exports
  • ECMAScript Private Fields
  • export * as ns Syntax
  • Top-Level await
  • JSDoc Property Modifiers
  • Better Directory Watching on Linux and watchOptions
  • “Fast and Loose” Incremental Checking
The new release also brings two new editor features - "Convert to Template String" and "Call Hierarchy"
 
The company said that in TypeScript 3.8, it has added a new syntax for type-only imports and exports.
  1. import type { SomeThing } from "./some-module.js";  
  2. export type { SomeThing };  
import type will only import declarations to be used for type annotations and declarations and will always get fully erased, so there’s no remnant of it at runtime. Same way, export type only offers an export that can be used for type contexts, and is also erased from TypeScript’s output.
 
You can get the latest release through NuGet, or using npm with the command: npm install typescript
 
To learn more you can visit the official announcement here.