cpt-waffle-lotide
Version:
LoTide in Typescript
30 lines (29 loc) • 1.23 kB
TypeScript
interface trackInterface {
id: string;
name: string;
artist: string;
album: string;
}
interface playlistInterface {
id: string;
name: string;
tracks: string[];
}
interface musicInterface {
tracks: Record<string, trackInterface>;
playlists: Record<string, playlistInterface>;
printPlaylists: undefined | (() => void);
printTracks: undefined | (() => void);
printPlaylist: undefined | ((playlistId: string) => void);
addTrackToPlaylist: undefined | ((trackId: string, playlistId: string) => void);
addTrack: undefined | ((name: string, artist: string, album: string) => void);
addPlaylist: undefined | ((name: string) => void);
}
declare const library: musicInterface;
declare const printPlaylists: (this: musicInterface) => void;
declare const printTracks: (this: musicInterface) => void;
declare const printPlaylist: (this: musicInterface, playlistId: string) => void;
declare const addTrackToPlaylist: (this: musicInterface, trackId: string, playlistId: string) => void;
declare const generateUid: () => string;
declare const addTrack: (this: musicInterface, name: string, artist: string, album: string) => void;
declare const addPlaylist: (name: string) => void;