@dvxch/yandex-music
    Preparing search index...

    Class SearchResult<T>

    One typed block of search results (for example all matching tracks).

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    client?: Client

    The client that created this model, used by convenience methods.

    order?: number

    Display order of this block.

    perPage?: number

    Maximum results per page.

    results?: T[]

    The matched entities.

    total?: number

    Total number of matches.

    type?: string

    Result type (track, artist, album, playlist, video, user).

    Methods

    • Assert that this model carries a client, returning it narrowed to non-null.

      Convenience methods that need to call the API use this to fail fast with a clear message instead of a generic "cannot read property of undefined".

      Returns Client

      The owning Client.

      When the model was created without a client.