TypeScript intro / mobile dev camp
-
Upload
andrea-balducci -
Category
Software
-
view
451 -
download
3
Transcript of TypeScript intro / mobile dev camp
p r o d u c e d b y
intro to
M o b i l e d e v c a m p @ a n c o n a 2 0 1 5 0 6 3 0
d i r e c t ed by
andrea b a l d u c c i
@andreabalducci
s t arr i n g
episode 1
a long time ago in a galaxy
far, far away
…written in 10 days for
the mythical…
NON PROFESSIONAL PROGRAMMER
NON PROFESSIONAL PROGRAMMER
nowadays
welcome to the {undefined} side
==
NaN NaN
equality chart
episode 2
TypeScript is a typed superset of JavaScript that compiles to
plain JavaScript
Types enable TypeScript developers to use highly-productive development
tools and practices
static checking, symbol-based navigation,
statement completion, and code refactoring.
https://github.com/borisyankov/DefinitelyTyped
demohttp://tinyurl.com/ts-mobcamp
class Jedi {name: string;constructor(name: string) {this.name = name;
}
useTheForce() { }}
class SuperHero {name: string;constructor(name: string) {this.name = name;
}
useTheForce() { }jump() {}
}
var hulk = new SuperHero('Hulk');
var yoda = new Jedi('Yoda');
yoda = hulk
TypeScript is a
structural type system
episode 3
decorators
http://blog.wolksoftware.com/decorators-reflection-javascript-typescript
de co rato r s are a pro p o se d standard for ECMAScript 7, to annotate and modify classes and properties at design time.
decorators
http://blog.wolksoftware.com/decorators-reflection-javascript-typescript
Class
property
method
parameter