Skip to content

Commit 919a019

Browse files
authored
fix(types): add missing types for Player and ReactJSX (#3732)
1 parent dd308d7 commit 919a019

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

globals.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ declare namespace Spicetify {
176176
index: PlayerIndex;
177177
item: PlayerTrack;
178178
shuffle: boolean;
179+
smartShuffle: boolean;
179180
repeat: number;
180181
speed: number;
181182
positionAsOfTimestamp: number;
@@ -236,6 +237,17 @@ declare namespace Spicetify {
236237
album_disc_count: string;
237238
track_player: string;
238239
album_title: string;
240+
"canvas.artist.avatar": string;
241+
"canvas.artist.name": string;
242+
"canvas.artist.uri": string;
243+
"canvas.canvasUri": string;
244+
"canvas.entityUri": string;
245+
"canvas.explicit": string;
246+
"canvas.fileId": string;
247+
"canvas.id": string;
248+
"canvas.type": string;
249+
"canvas.uploadedBy": string;
250+
"canvas.url": string;
239251
"collection.can_add": string;
240252
image_large_url: string;
241253
"actions.skipping_prev_past_track": string;
@@ -255,6 +267,18 @@ declare namespace Spicetify {
255267
duration: string;
256268
album_track_count: string;
257269
popularity: string;
270+
associated_video_id: string;
271+
video_association: string;
272+
video_association_image: string;
273+
video_association_image_height: string;
274+
video_association_image_height_large: string;
275+
video_association_image_height_xxlarge: string;
276+
video_association_image_large: string;
277+
video_association_image_width: string;
278+
video_association_image_width_large: string;
279+
video_association_image_width_xxlarge: string;
280+
video_association_image_xxlarge: string;
281+
[key: string]: string;
258282
};
259283
type Album = {
260284
type: string;
@@ -298,6 +322,12 @@ declare namespace Spicetify {
298322
hifiStatus: number;
299323
};
300324
namespace Player {
325+
/**
326+
*
327+
* Contains vast array of internal APIs.
328+
* Please explore in Devtool Console.
329+
*/
330+
const origin: any;
301331
/**
302332
* Register a listener `type` on Spicetify.Player.
303333
*
@@ -1314,6 +1344,8 @@ declare namespace Spicetify {
13141344
const ReactDOM: any;
13151345
/** React DOM Server instance to render components to string */
13161346
const ReactDOMServer: any;
1347+
/** React JSX runtime instance to transform JSX elements */
1348+
const ReactJSX: any;
13171349

13181350
/** Stock React components exposed from Spotify library */
13191351
namespace ReactComponent {

0 commit comments

Comments
 (0)