diff options
Diffstat (limited to 'utils/types/non-empty-array.ts')
| -rw-r--r-- | utils/types/non-empty-array.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/types/non-empty-array.ts b/utils/types/non-empty-array.ts new file mode 100644 index 0000000..59a6160 --- /dev/null +++ b/utils/types/non-empty-array.ts @@ -0,0 +1,2 @@ +/** A non-empty readonly array; the type system guarantees index 0 exists. */ +export type NonEmptyArray<T> = readonly [T, ...T[]] |
