Skip to content

Commit

Permalink
docs(best practices): create section for async functions (#16574)
Browse files Browse the repository at this point in the history
  • Loading branch information
HonkingGoose committed Jul 15, 2022
1 parent 6ae4a55 commit badccaf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/development/best-practices.md
Expand Up @@ -116,6 +116,11 @@ try {
}
```

### Aysnc functions

Never use `Promise.resolve` in async functions.
Never use `Promise.reject` in async functions, instead throw an `Error` class type.

### Dates and times

Use [`Luxon`](https://www.npmjs.com/package/luxon) to handle dates and times.
Expand Down

0 comments on commit badccaf

Please sign in to comment.