VS2013, TypeScript, and Angular 2

For those who aren’t familiar with Angular, it is an open-source framework for web applications from Google.  Armed with a bit of free time and a new idea for a website, I thought it might be fun to explore the new version of Angular (version 2) written in TypeScript. Getting Started Getting started with Angular […]

Not All Code Paths Return a Value in TypeScript

I’ve been working on a TypeScript implementation of the Oware variant of Mancala, and ran across an interesting case which is currently NOT a compiler error in TypeScript v1.7: public MakeMove(board: Board): boolean { var pos = this.clickedPosition; this.clickedPosition = null; if (null === pos) { return false; } if (this.id === pos.player) { if (board.GetStones(pos) […]

Default Arguments and Variable Arguments in Typescript

For my money, the Typescript language is a great way to extend JavaScript, while still transpiling into functional (and readable) JavaScript. Case in point – default and variable arguments.  Default arguments assign a default value to a function’s parameters so you do not need to specify every parameter when calling.  In JavaScript, a quick conditional […]

TypeScript v1.0 released

The title pretty much says it all – Microsoft announced today that TypeScript has reached version 1.0.  It is now considered a first-class citizen and will get all the love and attention it deserves inside of Microsoft and, more importantly to me, Visual Studio. I’m a big fan of TypeScript, and it can’t be beat […]