Common stuff initial

This commit is contained in:
Torben Pi Jensen 2023-11-05 15:27:38 +01:00
parent f6790de669
commit 1e98cc84d5
3 changed files with 6 additions and 5 deletions

View File

@ -4,10 +4,10 @@ export class Song {
public title: string; public title: string;
public url: string; public url: string;
public image: string; public image: string;
public length: number; public length: number | null;
constructor(type: SongType, title: string, url: string, image: string, length: number) { constructor(type: SongType, title: string, url: string, image: string, length: number | null = null) {
this.type = type; this.type = type;
this.title = title; this.title = title;
this.url = url; this.url = url;
@ -20,4 +20,4 @@ export enum SongType {
YouTube, YouTube,
Spotify Spotify
} }

4
dist/dataTypes.d.ts vendored
View File

@ -3,8 +3,8 @@ export declare class Song {
title: string; title: string;
url: string; url: string;
image: string; image: string;
length: number; length: number | null;
constructor(type: SongType, title: string, url: string, image: string, length: number); constructor(type: SongType, title: string, url: string, image: string, length?: number | null);
} }
export declare enum SongType { export declare enum SongType {
YouTube = 0, YouTube = 0,

1
dist/dataTypes.js vendored
View File

@ -3,6 +3,7 @@ exports.__esModule = true;
exports.SongType = exports.Song = void 0; exports.SongType = exports.Song = void 0;
var Song = /** @class */ (function () { var Song = /** @class */ (function () {
function Song(type, title, url, image, length) { function Song(type, title, url, image, length) {
if (length === void 0) { length = null; }
this.type = type; this.type = type;
this.title = title; this.title = title;
this.url = url; this.url = url;