Skip to main content

externalabstractList <Item_Type>

Serenity/JS Screenplay Pattern-style wrapper around Array and array-like structures - see PageElement.

Hierarchy

Index

Constructors

externalconstructor

  • new List<Item_Type>(collection: Answerable<Item_Type[]>): List<Item_Type>
  • Type parameters

    • Item_Type

    Parameters

    Returns List<Item_Type>

Methods

staticexternalof

externaldescribedAs

  • Changes the description of this object, as returned by Describable.describedBy and Describable.toString.


    Parameters

    • externaldescription: Answerable<string> | MetaQuestion<Item_Type[], Question<Promise<string>>>

      Replaces the current description according to the following rules:

      • If description is an Answerable, it replaces the current description
      • If description is a MetaQuestion, the current description is passed as context to description.of(context), and the result replaces the current description

    Returns this

publicexternalas

  • as<O>(mapping: (answer: Item_Type[]) => O | Promise<O>): QuestionAdapter<O>
  • Maps this question to one of a different type.

    Question.about('number returned as string', actor => '42')   // returns: QuestionAdapter<string>
    .as(Number) // returns: QuestionAdapter<number>

    Type parameters

    • O

    Parameters

    • externalmapping: (answer: Item_Type[]) => O | Promise<O>

    Returns QuestionAdapter<O>

externaldescribedBy

  • Resolves the description of this object in the context of the provided actor.


    Parameters

    Returns Promise<string>

externaltoString

  • toString(): string
  • Returns a human-readable description of this object.


    Returns string

externalforEach

  • forEach(callback: (current: CurrentItem<Item_Type>, index: number, items: Item_Type[]) => void | Promise<void>): Task
  • Parameters

    • externalcallback: (current: CurrentItem<Item_Type>, index: number, items: Item_Type[]) => void | Promise<void>

    Returns Task

externalabstracteachMappedTo

  • eachMappedTo<Mapped_Item_Type>(question: MetaQuestion<Item_Type, Question<Mapped_Item_Type | Promise<Mapped_Item_Type>>>): List<Mapped_Item_Type>
  • Type parameters

    • Mapped_Item_Type

    Parameters

    Returns List<Mapped_Item_Type>

externalabstractwhere

  • Type parameters

    • Answer_Type

    Parameters

    Returns List<Item_Type>

externalabstractcount

externalabstractfirst

externalabstractlast

externalabstractnth

externalansweredBy