whatsapp-api-js - v5.2.0
    Preparing search index...

    Class Section<T, N>Abstract

    All sections are structured the same way, so this abstract class is used to reduce code duplication

    • All sections must have between 1 and N elements
    • All sections must have a title if more than 1 section is provided

    Type Parameters

    • T

      The type of the components of the section

    • N extends number

      The maximum number of elements in the section

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Builds a section component

      Type Parameters

      • T
      • N extends number

      Parameters

      • name: string

        The name of the section's type

      • keys_name: string

        The name of the section's keys

      • elements: AtLeastOne<T>

        The elements of the section

      • max: N

        The maximum number of elements in the section

      • Optionaltitle: string

        The title of the section

      • title_length: number = 24

        The maximum length of the title

      Returns Section<T, N>

      If more than N elements are provided

      If title is over 24 characters if provided

    Properties

    title?: string

    The title of the section