Proposal for Opaque Type in `Array.NonEmptyArray` to Improve Readability and Intuition
Should we make an opaque type for
Array.NonEmptyArray
Array.NonEmptyArray
? Currently the following line:
const x: A.NonEmptyArray<string> = ['foo']
const x: A.NonEmptyArray<string> = ['foo']
produces the type:
const x: [string, ...string[]]
const x: [string, ...string[]]
which a) is not intuitive to developers without context, and b) when the element type itself is complicated/long, the duplication makes the overall type hard to read + is often cut off by VSC