In an attempt to retrieve all players sorted by their points from the Firebase(V9) Realtime Database, I followed the guidance provided in the documentation.
However, using ref(db, 'usersPoints')
resulted in a TypeScript error:
Argument of type 'DatabaseReference' is not assignable to parameter of type 'Query<unknown>'. Type 'DatabaseReference' is missing the following properties from type 'Query<unknown>': converter, type, firestore, withConverter
The code snippet causing this issue is as follows:
const db = getDatabase();
const playersByPoints = query(ref(db, "usersPoints"), orderByChild("points"));