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

    Class TrackShort

    A compact reference to a track inside a playlist.

    Holds the ids needed to fetch the full Track; the track field is only populated by endpoints that inline the full object.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    albumId?: string

    Album id the track is referenced from.

    chart?: JSONValue

    Chart placement (raw JSON, pending a typed model).

    client?: Client

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

    id?: string | number

    Track id.

    originalIndex?: number

    Original index within the source list.

    originalShuffleIndex?: number

    Original index within the shuffled source list.

    playCount?: number

    Play counter.

    recent?: boolean

    Whether recently added.

    timestamp?: string

    Timestamp the track was added at.

    track?: Track

    The full track, when inlined by the endpoint.

    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.