flâneur — a map of the web's best reading

TypeScript: Documentation - TypeScript 3.8

typescriptlang.org · 3,017 words · saved by 1 readers

TypeScript 3.8 Release Notes

Type-Only Imports and Export This feature is something most users may never have to think about; however, if you’ve hit issues under isolatedModules , TypeScript’s transpileModule API, or Babel, this feature might be relevant. TypeScript 3.8 adds a new syntax for type-only imports and exports. ts import type { SomeThing } from "./some-module.js" ; export type { SomeThing }; import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there’s no remnant of it at runtime. Similarly, export type only provides an export that can be used fo

Explore this link on the map →

related reading