xref: /MusicFree/src/types/music.d.ts (revision bf6e62f27bf21a011995d7561e0093fae1a2d72e)
1declare namespace IMusic {
2    export interface IMusicItemBase {
3        /** 歌曲在平台的唯一编号 */
4        id: string;
5        /** 平台 */
6        platform: string;
7        /** 其他属性 */
8        [k: keyof IMusicItem]: IMusicItem[k];
9    }
10
11    export interface IMusicItem {
12        /** 歌曲在平台的唯一编号 */
13        id: string;
14        /** 平台 */
15        platform: string;
16        /** 作者 */
17        artist: string;
18        /** 标题 */
19        title: string;
20        /** 时长(s) */
21        duration: number;
22        /** 专辑名 */
23        album: string;
24        /** 专辑封面图 */
25        artwork: string;
26        /** 音源 */
27        url?: string;
28        _internalData?: Record<string, any>;
29        /** 其他可以被序列化的信息 */
30        [k: string]: any
31
32    }
33}