introducing type script

Post on 09-Jan-2017

933 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Introducing TypeScriptLarge scale JavaScript application development made easyBy Remo H. Jansen

What is TypeScript?TypeScript is a typed superset of JavaScript.

Compiles to plain JavaScript.

Any IDE. Any browser. Any host. Any OS.Open Source.

Based on open standards (ES6, ES7...).

Complex !== ComplicatedComplicated implies being difficult to understand but

with time and effort, ultimately knowable.

Complex describes the interactions between a number of entities. If the number of entities and interactions between them increase we will get to a point where it would be impossible to know and understand all of them.

TypeScript is the future of JavaScriptTypeScript allows us to use ES6 and ES7

today!

We can use the --target compiler option to specify ECMAScript target version: ES3, ES5 or ES6.

Classes

Inheritance

ModulesWe can use the --module compiler option to specify module code generation:

CommonJS

AMD

System

UMD

Async / Await

Decorators

Note: The code snippets above are part of an open-source project I’m working on. You can learn more about it at http://inversify.io/

● Metadata Reflection API

TypeScript goes beyond ES6 & ES7TypeScript is a strongly typed

programming language

TypeScript introduces some great design-time features that are not available in ES6 or ES7.

Namespaces● AKA Internal modules● It is recommended to

use ES6 modules instead

Types● Design-time only● Type inference● Optional type

annotations● Type guards● Union types● Intersection types

Interfaces● Design-time only● Structural type system● Type definitions (.d.ts files)

Generics● Design-time only● Generic constraints can be

declared

Questions?

Thanks!● Join the Dublin TypeScript Meetup to learn more!

● Get 20% off my book “Learning TypeScript” (eBook) using promo code PACKT20 at www.packtpub.com

top related