/// import { PassThrough, Readable } from 'stream'; import { AxiosResponse } from 'axios'; import { DownloadOptions, VideoInfo, VideoFormat } from './models'; declare module 'stream' { interface PassThrough { _isDestroyed?: boolean; } interface Readable { _isDestroyed?: boolean; } } interface YtdlStreamEventObj { error: Error; close: void; abort: void; response: AxiosResponse | null; progress: { chunkLength: number; downloaded: number; total: number; }; info: { info: VideoInfo; format: VideoFormat; }; } interface YtdlStream extends Readable { on(eventName: K, handler: (e: YtdlStreamEventObj[K], ...args: any[]) => void): this; once(eventName: K, handler: (e: YtdlStreamEventObj[K], ...args: any[]) => void): this; } declare const ytdl: (link: string, options?: DownloadOptions) => YtdlStream; export declare const downloadFromInfo: (info: VideoInfo, options: DownloadOptions) => PassThrough; export default ytdl; export declare const getBasicInfo: (id: string, options?: DownloadOptions) => Promise; export declare const getInfo: (id: string, options?: DownloadOptions) => Promise; export declare const chooseFormat: (formats: any, options: any) => any; export declare const filterFormats: (formats: any, filter: any) => any; export declare const validateID: (id: string) => boolean; export declare const validateURL: (string: string) => boolean; export declare const getURLVideoID: (link: string) => string | Error; export declare const getVideoID: (str: string) => string | Error; export declare const cache: Readonly<{ sig: Map; info: import("lru-cache"); }>; export { ytdl, };