SonarJS linter helper functions
    Preparing search index...

    Function getUnionTypes

    • Returns an array of the union types if the provided type is a union. Otherwise, returns an array containing the provided type as its unique element.

      Parameters

      • type: Type

        A TypeScript type.

      Returns Type[]

      An array of types. It's never empty.