mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 19:12:24 +00:00
18 lines
428 B
TypeScript
18 lines
428 B
TypeScript
import Text from './misc/Text.js';
|
|
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
|
|
export type AlertType = 'UNKNOWN' | 'WARNING' | 'ERROR' | 'SUCCESS' | 'INFO';
|
|
|
|
export default class Alert extends YTNode {
|
|
static type = 'Alert';
|
|
|
|
text: Text;
|
|
alert_type: AlertType;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.text = new Text(data.text);
|
|
this.alert_type = data.type;
|
|
}
|
|
} |