Damien Hampton
DH7

DH7

Blog Author Picture

Damien Hampton

I'm a software developer trying to build sustainable software using Test Driven Development. I advocate for autonomous teams, continuous learning and failing fast.

TypeScript function signatures

Oct 25, 20212 min read

Here are four different ways to define a typed function in TypeScript. //A const strLen: (str: string) => number = str => { return str.length; } //B type StrLenType = (str: string) => number const strLen: StrLenType = str => { return str.length...

Running CPU heavy tasks on Node.js