Not only the type annotations but also the class properties are invalid syntax in JavaScript, so you have to move the property declarations to the constructor (you could check the linked post for more details):
Alternatively you could try to convert your project to TypeScript following the instructions in this post.
I’m not sure what data are you getting back from Firebase but assuming that it’s a collection/dictionary then you can convert it to array this way:
firebase.database().ref('/desideri').on('value', (snapshot) => {
const objUser = snapshot.val();
// this is now bound to the component using the fat arrow =>
console.log(objUser);//this.events.publish('user:update', objUser);
// NOTE: Assuming that objUser is a Firebase collection/dictionary, i.e.:
// {
// 'firebase_unique_id_1': { ... },
// 'firebase_unique_id_2': { ... },
// // ...
// }
// Convert the Firebase collection/dictionary to array:
if (objUser) {
this.risultati = [];
this.risultatiKey = Object.keys(objUser);
for (let id of this.risultatiKey) {
this.risultati.push(objUser[id]);
}
}
});