Skip to content

chore: Prefer async functions#248

Draft
mroderick wants to merge 1 commit intoanimir:masterfrom
mroderick:prefer-async-await-over-then
Draft

chore: Prefer async functions#248
mroderick wants to merge 1 commit intoanimir:masterfrom
mroderick:prefer-async-await-over-then

Conversation

@mroderick
Copy link
Copy Markdown
Contributor

Since the codebase already uses async/await and requires node 14+, it might as well use async/await instead of then for Promises

By using async/await we can reduce the indentation levels, which generally makes the code easier to understand.

If refactoring like this is welcome, then I will expand on this PR to tidy up the test file and the source file it tests. Future PRs can tidy up other file pairs.

Since the codebase already uses async/await and requires node 14+, it might as well use async/await instead of then for Promises
@animir
Copy link
Copy Markdown
Owner

animir commented Dec 24, 2023

@mroderick Hey, refactoring is always welcome. Thank you for all the PRs you made recently. They are all valuable.

@mroderick mroderick marked this pull request as draft December 25, 2023 15:56
@mroderick
Copy link
Copy Markdown
Contributor Author

@mroderick Hey, refactoring is always welcome. Thank you for all the PRs you made recently. They are all valuable.

OK, then I'll add more to this PR. Setting it back to draft :)

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