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:
Read more · 3 min read
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.
Software developer with a passion for beautiful code
Get the Medium app