1declare namespace IMusic { 2 export interface IMusicItemBase extends ICommon.IMediaBase { 3 /** 其他属性 */ 4 [k: keyof IMusicItem]: IMusicItem[k]; 5 } 6 7 /** 音质 */ 8 export type IQualityKey = 'low' | 'standard' | 'high' | 'super'; 9 export type IQuality = Record< 10 IQualityKey, 11 { 12 url?: string; 13 size?: string | number; 14 } 15 >; 16 17 export interface IMusicItem { 18 /** 歌曲在平台的唯一编号 */ 19 id: string; 20 /** 平台 */ 21 platform: string; 22 /** 作者 */ 23 artist: string; 24 /** 标题 */ 25 title: string; 26 /** 时长(s) */ 27 duration: number; 28 /** 专辑名 */ 29 album: string; 30 /** 专辑封面图 */ 31 artwork: string; 32 /** 默认音源 */ 33 url?: string; 34 /** 歌词URL */ 35 lrc?: string; 36 /** 歌词 */ 37 rawLrc?: string; 38 /** 音质信息 */ 39 qualities?: IQuality; 40 /** 其他可以被序列化的信息 */ 41 [k: string]: any; 42 /** 内部信息 */ 43 [k: symbol]: any; 44 } 45} 46