Snippets of the day – Saturday, May 3, 2014

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! Typescript + underscore: serializing objects This little example runs on node.js and assumes you have the typescript type-definition file in the types subdirectory. The example defines two classes one representing a undergrad course in computer science and another one representing possible students for the course. Few […]

Snippets of the day – Monday, February 24, 2014

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! Typescript: passing a class member function as parameter to another function Typescript introduces the class construct and the concept of member functions. However if you try to pass a instance member function as parameter to another function the binding with the instance is lost. To solve […]

Snippets of the day – Monday, February 3, 2014

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! Define arrays using templates in Typescript You can now define an array using the template feature in Typescript. Be aware this way to build array is just a compile time ‘type annotation’ used to check type validity when using the array. Open the snippet Author:    […]

Snippets of the day – Friday, December 27, 2013

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! QueryString in Javascript This function allow to access a parameter in the url of a page. The original post in StackOverflow: http://stackoverflow.com/questions/3788125/jquery-querystring The solution is by Guffa http://stackoverflow.com/users/69083/guffa Open the snippet Author:    micurs JQuery typescript interface for $.ajax() callbacks To use JQuery $.ajax() you must […]

Snippets of the day – Wednesday, December 11, 2013

Posted on Leave a commentPosted in Snippets

Here are some of the most recently published snippets! fixes scope of functions returned by require can not be put in a module. must execute in context of the calling module. Open the snippet Author:    Dshusterman Create and use of ‘Module’ in TypeScript A module in TypeScript is just a syntactic construct to manage […]