diff options
Diffstat (limited to 'typescript.html.markdown')
| -rw-r--r-- | typescript.html.markdown | 8 | 
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" />  ``` | 
