common/dist/dataTypes.js
Torben Pi Jensen 4d3834be1d More stuff
2023-11-09 22:12:28 +01:00

55 lines
2.1 KiB
JavaScript

"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
exports.__esModule = true;
exports.PlayingSong = exports.QueuedSong = exports.Song = exports.SongType = void 0;
var SongType;
(function (SongType) {
SongType[SongType["YouTube"] = 0] = "YouTube";
SongType[SongType["Spotify"] = 1] = "Spotify";
})(SongType = exports.SongType || (exports.SongType = {}));
var Song = /** @class */ (function () {
function Song(type, title, songId, image) {
this.type = type;
this.title = title;
this.songId = songId;
this.image = image;
}
return Song;
}());
exports.Song = Song;
var QueuedSong = /** @class */ (function (_super) {
__extends(QueuedSong, _super);
function QueuedSong(type, title, songId, image, listener) {
var _this = _super.call(this, type, title, songId, image) || this;
_this.listener = listener;
return _this;
}
return QueuedSong;
}(Song));
exports.QueuedSong = QueuedSong;
var PlayingSong = /** @class */ (function (_super) {
__extends(PlayingSong, _super);
function PlayingSong(type, title, songId, image, listener, length, position) {
var _this = _super.call(this, type, title, songId, image, listener) || this;
_this.length = length;
_this.position = position;
return _this;
}
return PlayingSong;
}(QueuedSong));
exports.PlayingSong = PlayingSong;