youtubei.js / Parser / parseArray
Function: parseArray()
parseArray(data, validTypes)
parseArray<
T
,K
>(data
,validTypes
):ObservedArray
<InstanceType
<K
[number
]>>
Parses an array of items.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• data: undefined
| RawNode
[]
The data to parse.
• validTypes: K
YTNode types that are allowed to be parsed.
Returns
ObservedArray
<InstanceType
<K
[number
]>>
Defined in
parseArray(data, validType)
parseArray<
T
>(data
,validType
):ObservedArray
<T
>
Type Parameters
Parameters
• data: undefined
| RawNode
[]
• validType: YTNodeConstructor
<T
>
Returns
Defined in
parseArray(data)
parseArray(
data
):ObservedArray
<YTNode
>
Parameters
• data: undefined
| RawNode
[]