Actually only the first get1
is the one that needs to be a promise, the other get#
functions would be able to just return a value if they didn't have an async operation, but as timeout is a function itself you did a good use of the promise here.
Btw can you test the Rxjs
approach? i'm not so sure of that one, i just looked to the docs, i'm a noob with Rxjs
.