TypeScript 3.0

Hello!

Paul Shannon

  • Sr Engineer @ SitePen
  • Talkscript Podcast
  • Phoenix TypeScript
  • Committer: Dojo, Intern
  • devpaul

TypeScript 3.0

A new milestone

But first...

a quick look back

TypeScript 1.0

Let us build type-safe applications

TypeScript 2.0

Let us build and describe libraries

TypeScript 3.0

Will fill in the gaps necessary to build a complete ecosystem

New Features!

Richer tuple types

Extracting and spreading parameter lists

Rest parameters can now be defined as a generic and inferred as tuples!

Richer tuple types


				type Coordinate = [ number, number, number? ];
				type Restful = [ number, ... string[]];
				type Empty = [];
			

tuple types better match parameter lists

The unknown type

the least-capable type

Project References

enables projects to coexist

  • sibling projects are aware of each other
  • projects are built incrementally

Improved errors

JSX Support for defaultProps

provides default values from defaultProps

Feature directives


				/// <reference lib="es2015.promise" />
				export {};
			

Provides an expectation for a feature to be present.

Editor productivty

  • named import refactorings
  • closeing JSX tag completions and outlining
  • Quick fix: unreachable code
  • Quick fix: unused labels

The Future

References