youtubei.js / YTNodes / Mix
Class: Mix
Extends
Constructors
new Mix()
new Mix(
data
):Mix
Parameters
• data: RawNode
Returns
Overrides
Defined in
Properties
author
Inherited from
Defined in
src/parser/classes/Playlist.ts:15
badges
badges:
ObservedArray
<YTNode
>
Inherited from
Defined in
src/parser/classes/Playlist.ts:23
endpoint
endpoint:
NavigationEndpoint
Inherited from
Defined in
src/parser/classes/Playlist.ts:24
first_videos
first_videos:
ObservedArray
<YTNode
>
Inherited from
Defined in
src/parser/classes/Playlist.ts:20
id
id:
string
Inherited from
Defined in
src/parser/classes/Playlist.ts:13
menu
menu:
YTNode
Inherited from
Defined in
src/parser/classes/Playlist.ts:22
share_url
share_url:
null
|string
Inherited from
Defined in
src/parser/classes/Playlist.ts:21
thumbnail_overlays
thumbnail_overlays:
ObservedArray
<YTNode
>
Inherited from
Defined in
src/parser/classes/Playlist.ts:25
thumbnail_renderer?
optional
thumbnail_renderer:PlaylistCustomThumbnail
|PlaylistVideoThumbnail
Inherited from
Defined in
src/parser/classes/Playlist.ts:17
thumbnails
thumbnails:
Thumbnail
[]
Inherited from
Defined in
src/parser/classes/Playlist.ts:16
title
title:
Text
Inherited from
Defined in
src/parser/classes/Playlist.ts:14
type
readonly
type:string
Inherited from
Defined in
video_count
video_count:
Text
Inherited from
Defined in
src/parser/classes/Playlist.ts:18
video_count_short
video_count_short:
Text
Inherited from
Defined in
src/parser/classes/Playlist.ts:19
view_playlist?
optional
view_playlist:Text
Inherited from
Defined in
src/parser/classes/Playlist.ts:26
type
static
type:string
='Mix'
Overrides
Defined in
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Cast to one of the given types.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
Returns
InstanceType
<K
[number
]>
Inherited from
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is Mix & { [k in string]: R }
Check for a key without asserting the type.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
this is Mix & { [k in string]: R }
Whether the node has the key
Inherited from
Defined in
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Check if the node is of the given type.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
Defined in
key()
key<
T
,R
>(key
):Maybe
Assert that the node has the given key and return it.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key