ts-type-forge
    Preparing search index...

    Type Alias MutableNonEmptyTuple<A>

    MutableNonEmptyTuple: [A, ...A[]]

    Represents a mutable structural tuple that is guaranteed to have at least one element.

    Type Parameters

    • A

      The type of elements in the array.

    type NA = MutableNonEmptyTuple<string>; // [string, ...string[]]
    const valid: NA = ["hello"];
    const alsoValid: NA = ["hello", "world"];
    // const invalid: NA = []; // Error