APlayer icon indicating copy to clipboard operation
APlayer copied to clipboard

Can we add a `d.ts` type hint file

Open oovm opened this issue 5 years ago • 1 comments

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

oovm avatar Oct 22 '20 02:10 oovm

The currently released version does not include the src folder, in this case js.map will not work

oovm avatar Oct 22 '20 02:10 oovm