eclipse-thingweb / eclipse-thingweb/node-wot
Promise async code style
Open
enhancement
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
_input from @erossignon_
We have different code styles used throughout the code for promises.
```JS
method(...): Promise<...> {
return new Promise<...>((resolve, reject) => {
// actual code
}
}
```
or
```JS
async method(...): Promise<...> {
// actual code
}
```
Shall we leave it as is or go with one or the other?
The 2nd variant seems cleaner and less verbose. I don't believe there is any downside...
Contributor guide
Assessment
This issue has not been assessed yet.