SlideShare a Scribd company logo
01/2014
Agenda

What is TypeScript.
Language Features.
Integration in Environnement.
Future.

2
What is TypeScript

Why create TypeScript
CoffeScript, Dart, TypeScript…
Transcripting.

3
What is TypeScript/Why create TypeScript
• TypeScript is just a tool to be used at coding-time
to improve the quality of your JavaScript
• TypeScript is designed for development of large
applications and compiles down to JavaScript

• Adds optional static typing and class-based
POO to the language
4
What is TypeScript/CoffeScript, Dart, TypeScript
• CoffeeScript – a fresh coat of paint
• Dart – a fresh look at the web
• TypeScript – the JavaScript of tomorrow

5
What is TypeScript/Transcripting

• In reality is not a compilation but a transcripting

6
Language Features
Primitive Type
Grammar
Generics
Poo
Parametres
Exception
Include / Reference
7
Language Features / Primitive Type
•
•
•
•
•
•
•
•

Number
Boolean
String
Void
Null
Undefined
Enum
String Literal
8
Language Features / Grammar

9
Language Features / Grammar
var myString = 'A String';
var myNumber = 1;
var myBoolean = true;
var myString: string = 'A String';
var myNumber: number = 1;
var myBoolean: boolean = true;

10
Language Features / Grammar
var example = {
name: 'Example',
id: 5,
collection: ['a', 'b', 'c']
}

11
Language Features / Grammar
var example: {
name: string;
id: number;
collection: string[];
} = {
name: 'Example',
id: 5,
collection: ['a', 'b', 'c']
}
12
POO / Items
Classes
Interfaces
Function
Modules
Generic

13
Classes
class Car {
// Property (public by default)
engine: string;
// Constructor
// (accepts a value so you can
// initialize engine)
constructor(engine: string) {
this.engine = engine;
}
}
14
Interface
interface ICar {
engine: string;
color: string;
}
class Car implements ICar {
constructor(
public engine: string,
public color: string) {
}
}
15
Function
class Car {
engine: string;
constructor(engine: string) {
this.engine = engine;
}
start() {
return "Started " +
this.engine;
}
}
16
Generics
class G<T> { // parameter T
self: G<T>; // T type argument
f() {
// Both of type G<T>
this.self = this;
}
}

17
Module
module Shapes {
export class Rectangle {
constructor(
public height: number,
public width: number) {
}
}
}
// This works!
var rect = Shapes.Rectangle(10, 4);

18
Module
// bootstrapper.ts file
// imports the greeter.ts file as the
greeter module
import gt = module('greeter');
export function run() {
var el =
document.getElementById('content');
var greeter = new gt.Greeter(el);
greeter.start();
}
19
POO / Keyword
•
•
•
•
•
•

Public
Private
Interface
Class
Implements
Module

20
POO/ Function overload
function func(shape: Square): number;
function func(shape: Ellipse): number;
function func(shape: Triangle): number;
function func(shape: Shape): number {
if (shape instanceof Square) {
// Do something
}
// ...
throw new TypeError("Unsupported
type!");
}
21
Language Features / Parameter
print(char: string = '0') {
}
print4(index: number = this.length): number {
}
print2(char?: string) {
}
print3(...num: number[]) {
}
22
Language Features / Exception
• TypeScript using the throw keyword. In
JavaScript you can follow the throw statement
with any type, although typically strings are
used to supply an error message. In TypeScript
it is more usual to throw an “Error” object.

• Only on catch for multiple object Exception
23
Language Features / References
/// <reference path="SimplSocket.ts" />
module MyWebApp.BusinessLogic {
class ComplexWebSocket extends
MyWebApp.BusinessLogic.SimplSocket
{
}
}

24
Integration in Environnement
Editor
Web Essentials

25
Environnement / Editor
• Visual studio, WebStorm with IntelliSense and
Debug.
• Sublime Text 2, Vim and eMacs, but it does
not include the TLS, so there is no IntelliSense

26
Environnement / Web Essentials
• Produce a minified version of the generated
JavaScript file.
• Will automatically produce source map
(.js.map) files for debugging purposes as soon
as the .ts file is saved.
• …
27
Future
• 0.9.5
– Focus on user-report issues, Improve reliability,
Improve CPU- and memory-usage

• 1.0RC
– Finish stability work, Finish conformance with 1.0
spec

• 1.0
– Begin backward-compatibility
28
Future
• 1.x
– Async/Await
– Mixins
– Protected access
– More ECMAScript 6 language features
– ECMAScript 6 modules syntax
– ES6-compatible codegen

29
Questions?

30
Some links…
http://www.typescriptlang.org/
http://typescript.io/
http://en.wikipedia.org/wiki/TypeScript
http://www.dotnetcurry.com/showarticle.aspx?ID=939
http://www.johnpapa.net/typescriptpost2/
http://www.codeproject.com/Articles/469280/An-introduction-to-Type-Script
http://codeforhire.com/2013/06/18/coffeescript-vs-typescript-vs-dart/

31
Some books…

32
Find out more
• On https://techblog.betclicgroup.com/
About Betclic
•

•

•

Betclic Everest Group, one of the world leaders in online gaming, has a unique portfolio
comprising various complementary international brands: Betclic, Everest Gaming, bet-athome.com, Expekt…
Active in 100 countries with more than 12 million customers worldwide, the Group is
committed to promoting secure and responsible gaming and is a member of several
international professional associations including the EGBA (European Gaming and Betting
Association) and the ESSA (European Sports Security Association).
Through our brands, Betclic Everest Group places expertise, technological know-how and
security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion
of our players.

More Related Content

PPTX
Web technology slideshare
PDF
LLVM Compiler - Link Time Optimization
PDF
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
PDF
Introduction to the LLVM Compiler System
PDF
PPTX
C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
PPTX
Microsoft .Net Framework
PPT
Web technology slideshare
LLVM Compiler - Link Time Optimization
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
Introduction to the LLVM Compiler System
C++ CoreHard Autumn 2018. Создание пакетов для открытых библиотек через conan...
Microsoft .Net Framework

What's hot (20)

PDF
Clang Analyzer Tool Review
PPTX
MinGw Compiler
PPTX
ToyoTech_LT : C#.NET
PDF
PDF
Typescript for the programmers who like javascript
ODP
An Application Using Writer as a GUI for Creating and Maintaining [e]BNFs
DOCX
GNU GCC - what just a compiler...?
PDF
Modularity problems
PPT
10 Sep08 2003ver
PPTX
G++ & GCC
PDF
Not Your Fathers C - C Application Development In 2016
PDF
GNU Compiler Collection - August 2005
PDF
蔡学镛 Rebol漫谈
PDF
10 reasons to be excited about go
ODP
GCC, GNU compiler collection
PPTX
Compiling Under Linux
PPTX
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
PDF
Managed Code .NET
PPTX
Andrii Yatsenko "Make the most of Twig"
PPT
Introduction to llvm
Clang Analyzer Tool Review
MinGw Compiler
ToyoTech_LT : C#.NET
Typescript for the programmers who like javascript
An Application Using Writer as a GUI for Creating and Maintaining [e]BNFs
GNU GCC - what just a compiler...?
Modularity problems
10 Sep08 2003ver
G++ & GCC
Not Your Fathers C - C Application Development In 2016
GNU Compiler Collection - August 2005
蔡学镛 Rebol漫谈
10 reasons to be excited about go
GCC, GNU compiler collection
Compiling Under Linux
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
Managed Code .NET
Andrii Yatsenko "Make the most of Twig"
Introduction to llvm
Ad

Similar to Mini-Training: TypeScript (20)

PDF
End-to-End SPA Development using TypeScript
PDF
C++ Windows Forms L01 - Intro
PPTX
C++ basics
PPTX
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
PDF
Type script
PDF
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
PDF
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
PPTX
PPTX
TypeScript and SharePoint Framework
ODP
Javascript Update May 2013
PPTX
Introduction to Computer Networks and Networking
PDF
Understand the Trade-offs Using Compilers for Java Applications
PPTX
Introduction to Web development & HTML Programming
PDF
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
PDF
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
PPT
TypeScript - Javascript done right
PPTX
An Introduction to OMNeT++ 6.0
PDF
One language to rule them all type script
PPTX
Web Techdfasvfsvgsfgnolofgdfggy Unit I.pptx
PPTX
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
End-to-End SPA Development using TypeScript
C++ Windows Forms L01 - Intro
C++ basics
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Type script
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
TypeScript and SharePoint Framework
Javascript Update May 2013
Introduction to Computer Networks and Networking
Understand the Trade-offs Using Compilers for Java Applications
Introduction to Web development & HTML Programming
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
TypeScript - Javascript done right
An Introduction to OMNeT++ 6.0
One language to rule them all type script
Web Techdfasvfsvgsfgnolofgdfggy Unit I.pptx
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Ad

More from Betclic Everest Group Tech Team (20)

PPTX
Mini training - Reactive Extensions (Rx)
PPTX
Mini training - Moving to xUnit.net
PPTX
Mini training - Introduction to Microsoft Azure Storage
PPTX
Mini training- Scenario Driven Design
PDF
Email Management in Outlook
PDF
Mini-Training: SSO with Windows Identity Foundation
PPTX
Training - What is Performance ?
PPTX
Mini-Training: Docker
PDF
Mini Training Flyway
PDF
Mini-Training: NDepend
PDF
Management 3.0 Workout
PDF
PPTX
Short-Training asp.net vNext
PPTX
Training – Going Async
PDF
Mini-Training: Mobile UX Trends
PPTX
Training: MVVM Pattern
PPTX
Mini-training: Personalization & Recommendation Demystified
PPTX
Mini-training: Let’s Git It!
PDF
AngularJS Best Practices
Mini training - Reactive Extensions (Rx)
Mini training - Moving to xUnit.net
Mini training - Introduction to Microsoft Azure Storage
Mini training- Scenario Driven Design
Email Management in Outlook
Mini-Training: SSO with Windows Identity Foundation
Training - What is Performance ?
Mini-Training: Docker
Mini Training Flyway
Mini-Training: NDepend
Management 3.0 Workout
Short-Training asp.net vNext
Training – Going Async
Mini-Training: Mobile UX Trends
Training: MVVM Pattern
Mini-training: Personalization & Recommendation Demystified
Mini-training: Let’s Git It!
AngularJS Best Practices

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
KodekX | Application Modernization Development
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Approach and Philosophy of On baking technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Approach and Philosophy of On baking technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The AUB Centre for AI in Media Proposal.docx
Reach Out and Touch Someone: Haptics and Empathic Computing

Mini-Training: TypeScript