When I do tx.idbtrans
, I have an error:
Error: Property 'idbtrans' does not exist on type 'Transaction & { fileInfo: EntityTable<FileInfo, "id">; }'.
await db.transaction("rw", x.myUndoTransactionsToApply.tables.flat(), async (tx) => {
wmNormalUndoOrRedo.set(tx.idbtrans, 2); // 2 means we are in a redo operation
if(x && x.myUndoTransactionsToApply)
but if I check the transaction type (either in the documentation or in the source code since I’m using npm link), I can see that idbtrans
DOES exist:
$ cat src/classes/transaction/transaction.ts
…
/** Transaction
*
* https://dexie.org/docs/Transaction/Transaction
*
**/
export class Transaction implements ITransaction {
…
idbtrans: IDBTransaction;
…
Any idea how to debug this? For instance, can I print the full description of Transaction
to see what property is supposed to be allowed in Transaction?