More stuff

This commit is contained in:
Torben Pi Jensen 2023-11-09 20:49:45 +01:00
parent 2d561d15cd
commit 9c640ace62
3 changed files with 8 additions and 8 deletions

View File

@ -5,13 +5,13 @@ export enum SongType {
export class Song {
constructor(public type: SongType, public title: string, public songId: string, public image: string) {
constructor(public type: SongType, public title: string, public songId: string, public image: string, public length: number) {
}
}
export class PlayingSong extends Song {
constructor(type: SongType, title: string, songId: string, image: string, public length: number, public position: number) {
super(type, title, songId, image);
constructor(type: SongType, title: string, songId: string, image: string, length: number, public position: number) {
super(type, title, songId, image, length);
}
}

4
dist/dataTypes.d.ts vendored
View File

@ -7,10 +7,10 @@ export declare class Song {
title: string;
songId: string;
image: string;
constructor(type: SongType, title: string, songId: string, image: string);
length: number;
constructor(type: SongType, title: string, songId: string, image: string, length: number);
}
export declare class PlayingSong extends Song {
length: number;
position: number;
constructor(type: SongType, title: string, songId: string, image: string, length: number, position: number);
}

6
dist/dataTypes.js vendored
View File

@ -22,11 +22,12 @@ var SongType;
SongType[SongType["Spotify"] = 1] = "Spotify";
})(SongType = exports.SongType || (exports.SongType = {}));
var Song = /** @class */ (function () {
function Song(type, title, songId, image) {
function Song(type, title, songId, image, length) {
this.type = type;
this.title = title;
this.songId = songId;
this.image = image;
this.length = length;
}
return Song;
}());
@ -34,8 +35,7 @@ exports.Song = Song;
var PlayingSong = /** @class */ (function (_super) {
__extends(PlayingSong, _super);
function PlayingSong(type, title, songId, image, length, position) {
var _this = _super.call(this, type, title, songId, image) || this;
_this.length = length;
var _this = _super.call(this, type, title, songId, image, length) || this;
_this.position = position;
return _this;
}