2020-05

A first look at records and tuples in JavaScript

[2020-05-26] dev, javascript, es proposal

In this blog post, we take a first look at the ECMAScript proposal “Record & Tuple” (by Robin Ricard and Rick Button). This proposal adds two kinds of compound primitive values to JavaScript:

  • Records, immutable compared-by-value versions of plain objects
  • Tuples, immutable compared-by-value versions of Arrays

2020-04

Creating web apps via TypeScript and webpack

[2020-04-19] dev, javascript, typescript

This blog post describes how to create web apps via TypeScript and webpack. We will only be using the DOM API, not a particular frontend framework. The repository ts-demo-webpack with the files can be downloaded from GitHub.

How does TypeScript work? The bird’s eye view

[2020-04-18] dev, javascript, typescript

This blog post gives the bird’s eye view of how TypeScript works: What is the structure of a typical TypeScript project? What is compiled and how? How can we use IDEs to write TypeScript?

This post is meant to be read before learning how to write TypeScript code (material for doing that is listed at the end).

Strategies for migrating to TypeScript

[2020-04-17] dev, javascript, typescript

This blog post gives an overview of strategies for migrating code bases from JavaScript to TypeScript. It also mentions material for further reading.

Creating CommonJS-based npm packages via TypeScript

[2020-04-16] dev, javascript, typescript

This blog post describes how to use TypeScript to create npm packages with CommonJS modules. All the artifacts that are shown can be downloaded via the GitHub repository ts-demo-npm-cjs (I deliberately have not published it to npm).

Types for classes as values in TypeScript

[2020-04-15] dev, javascript, typescript

In this blog post, we explore classes as values:

  • What types should we use for such values?
  • What are the use cases for these types?

Typing functions in TypeScript

[2020-04-12] dev, javascript, typescript

This blog post explores static typing for functions in TypeScript.

2020-03

Class definitions in TypeScript

[2020-03-03] dev, javascript, typescript

In this blog post, we examine how class definitions work in TypeScript:

  • First, we take a quick look at the features of class definitions in plain JavaScript.
  • Then we explore what additions TypeScript brings to the table.

2020-02

What is a type in TypeScript? Two perspectives

[2020-02-26] dev, javascript, typescript

What are types in TypeScript? This blog post describes two perspectives that help with understanding them.

Typing Arrays in TypeScript

[2020-02-24] dev, javascript, typescript

In this blog post, we examine how Arrays can be typed in TypeScript.