In typescript it’s straighforward to create a generic type for a non-empty array:
type NonEmptyArray<T> = [T, ...T[]];
How would this look if I wanted to abstract to a non-empty iterable? As far as I know there are only spread operators for array and object types. I don’t know of any way in typescript to construct an iterable with explicit members set.