I'm trying to write a getDocOrThrow helper along the lines of whats shown in the screenshot. I would like to also be able to pass an _id for data correction purposes. I would also need to print the table of the referencing document, otehrwise it's too hard to track down from _id on its own . Can this be done?
.__tableName doesn't work, it just resolves to undefined. Can't I somehow print the tablename from my generic type R?