@salesforce/ts-types
    Preparing search index...

    Function ensureArray

    • Narrows an unknown value to an Array if it is type-compatible, or raises an error otherwise.

      Type Parameters

      • T = unknown

      Parameters

      • value: unknown

        The value to test.

      • Optionalmessage: string

        The error message to use if value is not type-compatible.

      Returns T[]

      UnexpectedValueTypeError If the value was undefined.