APlayer
APlayer copied to clipboard
Can we add a `d.ts` type hint file
Define the following interface to facilitate the ts project:
type Audio = {
name: String,
url: String,
artist: String,
cover: String,
lrc: String,
theme: String,
type: 'auto' | 'hls' | 'normal'
}
type AplayerOptions = {
container: HTMLElement,
fixed: Boolean,
mini: Boolean,
autoplay: Boolean,
theme: String,
loop: 'all' | 'one' | 'none',
order: 'list' | 'random',
preload: 'none' | 'metadata' | 'auto',
volume: number,
mutex: Boolean,
listFolded: Boolean,
listMaxHeight: number,
lrcType: 0 | 1 | 2 | 3,
audio: Audio[],
storageName: String
}
And include the source files when publishing the project on npm
The currently released version does not include the src folder, in this case js.map will not work