# [Handle all potential cases in a switch statement](https://x.com/housecor/status/1927688347754881245)

Published: Wed, Jun 18, 2025
Source: [x.com/housecor](https://x.com/housecor/status/1927688347754881245)
Tags: bookmark

```ts {12}
type Cat = { kind: 'cat' }
type Dog = { kind: 'dog' }
type Pet = Cat | Dog

function example(pet: Pet) {
  switch (pet.kind) {
    case: 'cat':
      return ...
    case: 'dog'
      return ...
    default:
      pet satisfies never
  }
}
```
