spottydl
Version:
NodeJS Spotify Downloader without any API Keys or Authentication
19 lines (18 loc) • 859 B
TypeScript
import { Track, Album, Playlist, Results } from './index';
export declare const checkLinkType: (link: string) => {
type: string;
id: string;
};
export declare const getProperURL: (id: string, type: string) => string;
/**
* Check the type of the object, can be of type <Track>, <Album> or <Results[]>
* @param {Track|Album|Playlist|Results[]} ob An object, can be type <Track>, <Album> or <Results[]>
* @returns {string} "Track" | "Album" | "Playlist" | "Results[]" | "None"
*/
export declare const checkType: (ob: Track | Album | Playlist | Results[]) => 'Track' | 'Album' | 'Playlist' | 'Results[]' | 'None';
/**
* Check the path if it exists, if not then we throw an error
* @param {string} path A string that specifies the path
* @returns {string} `path` modified to be absolute
*/
export declare const checkPath: (path: string) => string;