Is it possible to specify the type
for the returned data in this line modal.onDidDismiss(data =>
? It doesn't seem to be working. I want to ensure compile-time
type
checking for the returned data. Any suggestions?
An error is being thrown:
[ts] Expected 1 arguments, but got 2.(parameter) Transaction: any
When I attempted to do this:
modal.onDidDismiss(data:Transaction => {
this.transactions.push(data);
});
Original code snippet:
goToTransaction() {
const modal = this.modalCtrl.create('TransactionPage');
modal.onDidDismiss(data => {
this.transactions.push(data);
});
modal.present();
}