-
-
Notifications
You must be signed in to change notification settings - Fork 49
Feature/improvements #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ismi29ch
commented
Aug 3, 2023
•
edited
Loading
edited
- Added support for typescript
- Handle edge cases (error handling)
- Auto Pick name from Url
- User defined delay (Allow to pass custom delay)
Thanks for creating a TypeScript definition. 🙌 Can you follow this styleguide? Some examples: |
Hey @sindresorhus, |
Please rebase from the |
8402fc2
to
3368761
Compare
Hey @sindresorhus, |
Custom delay Auto Pick name from Url Handle edge cases
3cdff05
to
22bfef2
Compare
@sindresorhus |
##### downloadInterval | ||
|
||
Type: `number` | ||
|
||
The delay time between each file download in milliseconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong location. Please look at the readme and you'll see that the below code example is for the rename
option.
|
||
await downloadFiles(); | ||
``` | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is messy code style wise. You are mixing spaces with tabs and the formatting is completely off.
Use the formatting shown in https://github.com/sindresorhus/typescript-definition-style-guide#documentation
Use single-quotes.
|
||
@description - This function is used to determine the filename for each downloaded file. | ||
*/ | ||
export type RenameFunction = (options: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options
is the wrong term here. They are not options.
|
||
@param options - The options for downloading. | ||
|
||
@returns - A promise that resolves when all files have been downloaded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the correct TSDoc syntax. Applies to the everything else too.
@returns - A promise that resolves when all files have been downloaded. | |
@returns A promise that resolves when all files have been downloaded. |
/** | ||
@default undefined - (use original filenames) | ||
|
||
@description - A function that returns the new filename for each downloaded file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing example like in the readme.