Skip to content

Commit

Permalink
docs(typings): update typings with validation functions
Browse files Browse the repository at this point in the history
closes #296
  • Loading branch information
fent committed Mar 13, 2018
1 parent 024a531 commit d405143
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion typings/index.d.ts
Expand Up @@ -197,7 +197,10 @@ declare module 'ytdl-core' {
function downloadFromInfo(info: videoInfo, options?: downloadOptions): Readable;
function chooseFormat(format: videoFormat | videoFormat[], options?: downloadOptions): videoFormat | Error;
function filterFormats(formats: videoFormat | videoFormat[], filter?: 'video' | 'videoonly' | 'audio' | 'audioonly' | ((format: videoFormat) => boolean)): videoFormat[];
function validateLink(string: string): boolean;
function validateID(string: string): boolean;
function validateURL(string: string): boolean;
function getURLVideoID(string: string): string | Error;
function getVideoID(string: string): string | Error;
}

function ytdl(link: string, options?: ytdl.downloadOptions): Readable;
Expand Down

0 comments on commit d405143

Please sign in to comment.