I think You should have a look into javascript promises, to understand, how and why they are working. Here You have some usefull pages:
- https://developers.google.com/web/fundamentals/primers/promises
- https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Promise
- https://wiki.selfhtml.org/wiki/JavaScript/Promise
In typescript it’s not required to give a type, it’s a personal preference how to write code. You could also write something like .then(value => { } );
.
Can You provide Your code for this case?
Cheers
Unkn0wn0x