Typescript II - Nominal and Structural Typing

Here we look at two closely related concepts - the behaviour of Typescript’s type system, and how we can get the type of an object at runtime. We dive into structural typing, nominal typing, Typescript’s value and type spaces, classes, and enums.

Link to this section …


Product Delivery Learnings 2019

One of my goals for 2019 was to improve my skills and knowledge around Product Delivery. What is Product Delivery? I’d define it as a set of practices, attitudes, and tools which can be used to improve the quality of software and the speed at which it’s delivered to customers. It’s a large …


St Bathans

November 19 2019 · central-otago landscape-photography

St Bathans is an old gold mining town in Central Otago. It was established in the 1860s to support miners and is now nearly abandoned. It’s still a popular tourist spot with the blue lakes (photograph below) an iconic scene of the old sluicings.


Thinkpad T440s

November 17 2019 · tech laptop thinkpad

I recently picked up a second hand Thinkpad T440s laptop as a replacement for my Macbook Air. The Macbook was stuck with 4gb of RAM with no option to upgrade it. For a few hundred dollars I got a Thinkpad T440s with the following specs

  • Intel i5-4300U dual core CPU @ 1.90GHz
  • 12gb RAM (maximum for …

Typescript I - Safe Fetch with Decoders

What happens when we run this Typescript code?

type Person = {
    Name: string;
    Sport: string;
}

async function loadPerson(id: number): Promise<Person> {
    let result = await fetch(`/person/${id}.json`);

    return await result.json() as Person;
}

loadPerson(1).then(person => …