This TypeScript type haunted my dreams

After a year of being on sabbatical (that’s fancy-talk for unemployed), I recently joined Salto’s engineering team and started learning TypeScript. Salto allows business application admins to use DevOps methodlogies when managing their configuration. One of the cool things about them is that their core business logic is open source. As part of that OSS repo, there’s a standalone library called lowerdash, where I found they have a nifty little type called OneOf to express mutually-exclusive properties. Here’s an example:

This is a companion discussion topic for the original entry at

Let’s put as Key aside for now […]

What does as Key do? Either I just can’t find it or it was never explained later in the article.