eclipse-thingweb / eclipse-thingweb/node-wot

Promise async code style

Open
#569 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.