xref: /MusicFree/src/types/common.d.ts (revision 15a52c01d4ac71a8f54e90091a77cbf2361a75d8)
1declare namespace ICommon {
2    /** 支持搜索的媒体类型 */
3    export type SupportMediaType = 'music' | 'album' | 'artist';
4
5    /** 媒体定义 */
6    export type SupportMediaItemBase = {
7        music: IMusic.IMusicItemBase;
8        album: IAlbum.IAlbumItemBase;
9        artist: IArtist.IArtistItemBase;
10    };
11
12    export type IMediaBase = {
13        id: string;
14        platform: string;
15        $?: any;
16        [k: symbol]: any;
17        [k: string]: any;
18    };
19
20    /** 一些额外信息 */
21    export type IMediaMeta = {
22        lrc?: string;
23        associatedLrc?: IMediaBase;
24        headers?: Record<string, any>;
25        url?: string;
26        id?: string;
27        platform?: string;
28        qualities?: IMusic.IQuality;
29        $?: {
30            local?: {
31                localLrc?: string;
32                [k: string]: any;
33            };
34            [k: string]: any;
35        };
36        [k: string]: any;
37        [k: symbol]: any;
38    };
39}
40