Say I have the following:
const a = new A();
await a.getB().action();
A.prototype.getB() is async as-well as B.prototype.action().
If I try to await on the chaining of the functions I get an error:
TypeError: a.getB(...).action is not a function.
If I am separating the chaining of the functions and awaiting each promise it works fine. Is there a way to chain these promises and await them together?
(await a.getB()).action()?await (await a.getB()).action()orawait a.getB().then(result => result.action())