You can create an array type with a min length in TypeScript by using the rest syntax.

// Type requires at least one element
type NonEmptyArray<T> = [T, ...T[]];

// Type requires at least three elements
type ThreeOreMoreArray = [T, T, T, ...T[]];

You can now use the type and TypeScript ensures that the array meets the minimum length:

function example(items: NonEmptyArray<string>) {}

// Error: Source has 0 element(s) but target requires 1.
example([]);

// Works
example(["one"]);
example(["one", "two", "three"]);