summaryrefslogtreecommitdiffhomepage
path: root/typescript.html.markdown
diff options
context:
space:
mode:
authorPhilippe <pvlerick@gmail.com>2014-08-14 15:58:34 +0200
committerPhilippe <pvlerick@gmail.com>2014-08-14 15:58:34 +0200
commitb5ccc1d83cfbc1d11ca32e44708fc1eb339027c0 (patch)
treeba64d2b9cd91ebe1c3aba2abc4453788d8f95ed4 /typescript.html.markdown
parent7d0adf66eab5d391d63c2bcf0fd6b1291d781a22 (diff)
Small typos
Diffstat (limited to 'typescript.html.markdown')
-rw-r--r--typescript.html.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/typescript.html.markdown b/typescript.html.markdown
index 3da7bca2..8209fedb 100644
--- a/typescript.html.markdown
+++ b/typescript.html.markdown
@@ -37,8 +37,8 @@ function bigHorribleAlert(): void {
alert("I'm a little annoying box!");
}
-//Functions are first class citizens, have a shortened definition and can leverage the strong type inference
-//All examples are equivalent, the same signature will be infered by the compiler and the same JavaScript will be emitted
+//Functions are first class citizens, support the lambda "fat arrow" syntax and use type inference
+//All examples are equivalent, the same signature will be infered by the compiler, and same JavaScript will be emitted
var f1 = function(i: number) : number { return i * i; }
var f2 = function(i: number) { return i * i; } //Return type infered #TODO bug!
var f3 = (i : number) : number => { return i * i; }
@@ -106,7 +106,7 @@ class Point3D extends Point {
super(x, y); //Explicit call to the super class constructor is mandatory
}
- /Overwrite
+ //Overwrite
dist() {
var d = super.dist();
return Math.sqrt(d * d + this.z * this.z);
@@ -117,7 +117,7 @@ class Point3D extends Point {
//Generics
-//Including references to a definition file
+//Including references to a definition file:
/// <reference path="jquery.d.ts" />
```