Skip to content

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

Closed
wants to merge 12 commits into from

Conversation

ismi29ch
Copy link

@ismi29ch ismi29ch commented Aug 3, 2023

  • Added support for typescript
  • Handle edge cases (error handling)
  • Auto Pick name from Url
  • User defined delay (Allow to pass custom delay)

@sindresorhus
Copy link
Owner

@ismi29ch
Copy link
Author

ismi29ch commented Aug 5, 2023

Hey @sindresorhus,
I've made the requested changes, please look into them & let me know if still there's a room for improvement. Thanks

@sindresorhus
Copy link
Owner

Please rebase from the main branch and fix any linting issues.

@ismi29ch ismi29ch force-pushed the feature/improvements branch from 8402fc2 to 3368761 Compare August 7, 2023 03:27
@ismi29ch
Copy link
Author

ismi29ch commented Aug 7, 2023

Hey @sindresorhus,
I've made the requested changes again
please look into them & let me know if still there's a room for improvement. Thanks

@ismi29ch ismi29ch requested a review from sindresorhus August 7, 2023 04:22
@ismi29ch ismi29ch force-pushed the feature/improvements branch from 3cdff05 to 22bfef2 Compare September 21, 2023 03:36
@ismi29ch
Copy link
Author

@sindresorhus
Its been a while can you look into the PR again?

Comment on lines +77 to +81
##### downloadInterval

Type: `number`

The delay time between each file download in milliseconds.
Copy link
Owner

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();
```
*/
Copy link
Owner

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: {
Copy link
Owner

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.
Copy link
Owner

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.

Suggested change
@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.
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants