I think this would be a little tricky, more than likely what you would need to do is use the Repository pattern, and set your own promises, and manage the timings of those requests. If it goes beyond 20 seconds, cancel the request and handle the error back to the user.
Once you have the architecture in place, you could provide callbacks, something like:
this.query(() => { // firestore query here })
Your query method would create a custom promise object, and wait on the firestore query. If it takes too long, it would cancel the request.
Alternatively, you could setup two promises, one being the Firestore request, the other being an awaitTimeout promise.
Then, using promise.any, you could wait for the first response back - if it's the firestore query, cancel your await. If it's the await, cancel the firestore query.
More details here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/any