- TypeScript 3.9 -> 5.8 - ESLint 6 -> 9 (flat config) - Prettier 1 -> 3 - eslint-plugin-vue 6 -> 9 - Add vue-tsc for type checking - Migrate Sass @import to @use syntax - Fix Pinia persistence config for v4 - Add Spotify type declarations - Remove unused registerServiceWorker.ts
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
declare global {
|
|
interface SpotifyPlayer {
|
|
connect(): Promise<boolean>
|
|
disconnect(): void
|
|
addListener(event: string, callback: (data: unknown) => void): void
|
|
removeListener(event: string, callback?: (data: unknown) => void): void
|
|
getCurrentState(): Promise<SpotifyPlayerState | null>
|
|
resume(): Promise<void>
|
|
pause(): Promise<void>
|
|
togglePlay(): Promise<void>
|
|
seek(position_ms: number): Promise<void>
|
|
previousTrack(): Promise<void>
|
|
nextTrack(): Promise<void>
|
|
}
|
|
|
|
interface SpotifyPlayerState {
|
|
paused: boolean
|
|
track_window?: {
|
|
current_track?: {
|
|
name: string
|
|
}
|
|
}
|
|
}
|
|
|
|
interface SpotifyPlayerConstructorOptions {
|
|
name: string
|
|
getOAuthToken: (callback: (token: string) => void) => void
|
|
}
|
|
|
|
interface SpotifyNamespace {
|
|
Player: new (options: SpotifyPlayerConstructorOptions) => SpotifyPlayer
|
|
}
|
|
|
|
interface Window {
|
|
onSpotifyWebPlaybackSDKReady?: () => void
|
|
Spotify: SpotifyNamespace
|
|
}
|
|
|
|
const Spotify: SpotifyNamespace
|
|
}
|
|
|
|
export {}
|