-
Recently I sat down as a guest with Richard and Carl on .Net Rocks and recorded a show on my experiences on migrating from XAML to HTML . Chatting w/ Richard and Carl is always great. In this episode we tried to focus on my experiences on moving from XAML to Html but when you have 3 guys w/ A.D.D. staying...
-
One of the viewers of my Html for the XAML developer course over on Pluralsight sent me a question regarding the ability to drag and drop a d.ts file onto a TypeScript file and have the reference added correctly. He said that when he dropped the d.ts file he was expecting to get something like: /// <reference...
-
Today one of the viewers of my Pluralsight course was having issues and I was trying to help him via email, but to no avail. I asked him to send me his project so I could take a look myself. I ran the project and sure enough things were odd. I looked at his Typescript syntax and everything looked right...
-
One of the really powerful features that TypeScript brings to the JavaScript world is some Static Typing, even if it is only at code/compile time. With TypeScript I can say that an object is of a certain type which implies there are only a limited set of properties/methods available to me. ...
-
Today I extended one of our classes to use inheritance via Typescript (love that). When I refreshed the page I received an error here When I dropped to the Chrome debugger and outputted both the values for both ‘d’ and ‘b’ I was a bit shocked. ‘d’ was valid, but ‘b’...
-
When using Knockout JS wiring to the click binding is cake and simply just works. Or does it? Per the documentation there are multiple ways to wire the click binding within your html. Assume you have a method such as (the code below is TypeScript) public AddMember(member: MemberViewModel...
-
Knockout js is an awesome MVVM framework for HTML/Javascript development and there is an extension library which performs data validation called Knockout.Validation which is an equally awesome library. Today when doing some coding I needed to validate that all properties on a VM were valid. A quick...
-
Today I was in the middle of porting some raw javascript over to TypeScript as well as moving inline javascript into separate classes. In the middle of doing this I started to run into some really odd stuff. Namely, the ‘this’ context in one of my methods was set to window, not to the parent...
-
One of the really cool features of Knockout js is the ability to take a raw json object, say from a web endpoint, and map it to an observable. This is done via the mapping plug-in. Take a look at the code below for an example $.get(url) .done((data) => { var temp = self.ToDos(); _.each(data...
-
In my prior post I talked about how I setup my environment for testing my Typescript source via Jasmine and Chutzpah . That was just the beginning. Now that I had the ability to create unit tests I needed the ability to run them on our CI server, which happens to be Teamcity ). I did...
-
Recently I got back into writing html/javascript code as part of my day job and boy-o-boy have things changed since the last time i did any of this. One thing that has not changed for me however was my belief in unit testing, so it was very painful for me to be writing hundreds of lines of javascript...
-
In my prior post I talked about how to compile all your typescript files down to a single .js file. One issue I did not mention was that if you are going to use this AND you have a build server you will need to setup the Typescript installer. This can be done 2 ways. Install the Visual Studio 2012...
-
Recently our team has been using TypeScript for all our Javascript work. To be honest it has been a complete pleasure as it ‘just works’. However one annoyance we quickly found was that we had to choose what was the best approach for using TypeScript. Do we have a single .ts file which...
-
This is the first tech coming out of Microsoft in several years that I’m excited about….really excited about. So, I thought I would take you, dear reader, on a learning adventure with me. Let’s dive in… What is TypeScript? TypeScript is a new programming language that Microsoft...