Given:
type State =
| 'read'
| 'rejected'
| 'sent'
| 'refused'
| 'expired'
| 'draft'
Needed:
the template literal type Filters
, which defines a string of this kind: darft,sent,refused
.
type Filters =
| `${State}`
| `${State},${State}`
| `${State},${State},${State}`
// ...
// allowing strings containing from 1 to all of the `State`s.