I\'ve recently run into a certain situation a couple of times, which I didn\'t know how to solve properly. Assume the following code:
somethingAsync() .the
Simply return a tuple:
async add(dto: TDto): Promise { console.log(`${this.storeName}.add(${dto})`); return firebase.firestore().collection(this.dtoName) .withConverter(this.converter) .add(dto) .then(d => [d.update(this.id, d.id), d.id] as [any, string]) .then(x => this.get(x[1]));
}