Strongly Typed Events 0.3.0 – now with Signals
Turns out that I needed an even smaller type of event: the signal. It is an event that has no data; it just fires. The Strongly Typed Events project started with the IEvent
Turns out that I needed an even smaller type of event: the signal. It is an event that has no data; it just fires. The Strongly Typed Events project started with the IEvent
A while ago I started a GitHub project for Strongly Typed Events in TypeScript. I’ve uploaded the second version (0.2) with support for ISimpleEvent
Need to add named event support to your class? Implement the IEventHandling interface or extend from the abstract EventHandlingBase class. In this tutorial I explore how you can give your class named events.
Read the article Adding named events to your TypeScript classes (Part 4)In this tutorial I explore how an event list can be used to support scenarios with classes with a multitude of events. There is a way to decrease the number of private backing variables using an EventList
In a previous tutorial I explained how events can be implemented as properties on a class using Strongly Typed Events for TypeScript. Let’s explore how these work on interfaces. Interfaces work a little different, because they don’t have getters and setters on them (at least nog in TypeScript 1.8). Let’s explore how these work on interfaces.
Read the article Using strongly typed events in TypeScript with interfaces (Part 2)As a C# programming I have a lot of interest in the TypeScript project. Lately I’ve been playing around with it to look what it can do. I found myself in need of some event handling, so I decided to build something that looks like the event handling .Net gives you.
Read the article Strongly typed event handlers in TypeScript (Part 1)Many small applications need to store user credentials, but it’s hard to create a good username/password infrastructure. What if you could just use a small XML file with credentials that don’t actually stores the password, but just a hash and some salt.
For a small cloud project I ended up creating such a solution. This blog explains how to generate the credentials that can be stored in the XML. The aim is to make a solution that works on the client using JavaScript.
Read the article Login Credentials Generator – in JavaScriptRecently I had the pleasure of building a calculator example exercise. Begin a good programmer I used the some HTML entities as values on the buttons: ×, ÷ and ± as values. It turned out to be quite difficult to parse them with native JavaScript. It is not so hard with LoDash or jQuery, but I wanted to do it native.
Read the article Little life saver: parsing HTML entitiesWhen you want to display code, you are probably using PRE elements. The fact that these elements can contain markup makes them perfectly suited for syntax highlighting. Some plugins make it easier to copy the code using a button. Google Prettify has no such option. Let’s see if we can make copying easier by providing a “double click to select all”-feature to our pre fields.
Read the article Double Click to Select All CodeMulti-statement logic inside a Knockout.js data-bind expression can trigger an “Unable to parse bindings” error. Wrapping the logic in an immediately invoked function expression provides a compact solution.
Read the article Fixing an ‘Unable to Parse Bindings’ Error in Knockout.js