Quiero que la función saveAsAndGo() se realice antes de la callback() pero ese no es el caso, ¿cómo puedo asegurarme de que se realice antes de la devolución de llamada?
async saveAndGoTo(): Promise<void> { Store.setFileChanged(false); this.fileName = Store.getSelectedFile().name; if (this.fileName === 'New') { this.fileNotSavedDialog.hideDialog(); await this.saveAsAndGoTo().then(() => { this.callback(); }); } else { this.fileNotSavedDialog.hideDialog(); await this.saveDialog.updateFile().then(() => { this.callback(); }); } } async saveAsAndGoTo(): Promise<void> { await this.saveDialog.showDialog(); }