mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-22 22:18:14 +00:00
20 lines
571 B
TypeScript
20 lines
571 B
TypeScript
import { type ObservedArray, YTNode } from '../../helpers.js';
|
|
import { Parser, type RawNode } from '../../index.js';
|
|
|
|
export default class SignalServiceEndpoint extends YTNode {
|
|
static type = 'SignalServiceEndpoint';
|
|
|
|
public actions?: ObservedArray<YTNode>;
|
|
public signal?: string;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
if (Array.isArray(data.actions)) {
|
|
this.actions = Parser.parseArray(data.actions.map((action: RawNode) => {
|
|
delete action.clickTrackingParams;
|
|
return action;
|
|
}));
|
|
}
|
|
this.signal = data.signal;
|
|
}
|
|
} |