2020-04

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.

Alternatives to enums in TypeScript

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

A recent blog post explored how TypeScript enums work. In this blog post, we take a look at alternatives to enums.

Class-related types in TypeScript

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

In this blog post about TypeScript, we examine types related to classes and their instances.

Sections in source code

[2020-02-14] dev, javascript, ide

In this blog post, I’ll briefly explain the idea of having sections in source code. The IDE Visual Studio Code has a related concept: folding regions.

TypeScript: exhaustiveness checks via exceptions

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

TypeScript supports exhaustiveness checking for enums and similar types. This blog post shows how to use idiomatic JavaScript for this kind of check.

2020-01

Typing objects in TypeScript

[2020-01-30] dev, javascript, typescript

In this blog post, we will explore how objects and properties are typed statically in TypeScript.