xref: /MusicFree/src/types/common.d.ts (revision b882a19d884fffa32f7c8cef31652b909dceaa0f)
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        cacheControl?: string; // 是否缓存url解析结果
27        id?: string;
28        platform?: string;
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