Open in app

Sign In

Write

Sign In

Aart den Braber
Aart den Braber

1 Follower

Home

About

Jan 11, 2021

Pick one instance of a TypeScript array — destructuring [] to {}

If you are in the rare pickle of having to destructure a TS-array to a single instance, here is what I think could help you. First, I’ll explain the problem. Imagine an interface called `Order`. It’s defined like this:

Typescript

3 min read

Pick one instance of a TypeScript array — destructuring [] to {}
Pick one instance of a TypeScript array — destructuring [] to {}
Typescript

3 min read


Jan 9, 2021

Custom error messages with Jest for assertions

While writing an application in Node, I was trying to test whether an object had certain properties (by lack of TypeScript, because this was a a very simple application). The (now simplified) test looked like this.

Jest

3 min read

Custom error messages with Jest for assertions
Custom error messages with Jest for assertions
Jest

3 min read

Aart den Braber

Aart den Braber

1 Follower

Software developer with a passion for beautiful code

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech