mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 08:08:54 +00:00
refactor!: rewrite Analytics to TypeScript (#122)
* refactor: migrate all analytics’ classes to TypeScript Also, add AnalyticsShortsCarouselCard and AnalyticsRoot.
This commit is contained in:
@@ -36,6 +36,11 @@ class NavigationEndpoint extends YTNode {
|
||||
|
||||
constructor(data: any) {
|
||||
super();
|
||||
|
||||
// This is only present in Android nav endpoints
|
||||
if (Reflect.has(data || {}, 'innertubeCommand'))
|
||||
data = data.innertubeCommand;
|
||||
|
||||
const name = Object.keys(data || {})
|
||||
.find((item) =>
|
||||
item.endsWith('Endpoint') ||
|
||||
|
||||
Reference in New Issue
Block a user