raw getter to value
This commit is contained in:
parent
192a551a30
commit
a74e95ed16
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ class Track {
|
||||||
public views!: number;
|
public views!: number;
|
||||||
public requestedBy!: User;
|
public requestedBy!: User;
|
||||||
public playlist?: Playlist;
|
public playlist?: Playlist;
|
||||||
public readonly raw!: RawTrackData;
|
public readonly raw: RawTrackData = {} as RawTrackData;
|
||||||
public readonly _trackID = Date.now();
|
public readonly _trackID = Date.now();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,7 +106,7 @@ class Track {
|
||||||
this.playlist = data.playlist;
|
this.playlist = data.playlist;
|
||||||
|
|
||||||
// raw
|
// raw
|
||||||
Object.defineProperty(this, "raw", { get: () => Object.assign({}, { source: data.raw?.source ?? data.source }, data.raw ?? data), enumerable: false });
|
Object.defineProperty(this, "raw", { value: Object.assign({}, { source: data.raw?.source ?? data.source }, data.raw ?? data), enumerable: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue