ChemPare Documentation - v0.0.0
    Preparing search index...

    Type Alias MaybeArray<T>

    MaybeArray: T | T[]

    Type that allows either a single value or an array of values of type T. Used for functions that may return either a single value or an array of values.

    Type Parameters

    • T

      The type of the value

    // Example function returning either a single value or an array of values
    function getValues(): MaybeArray<string> {
    return Math.random() > 0.5 ? "single value" : ["value1", "value2"];
    }