Open
Description
Hi, I have created a common lib with a connector to upload the data to my API, but when using this in my React Native app, the transaction data is not matching the CrudEntry type. This is more or less what I have setup to test:
const transaction = await database.getNextCrudTransaction();
console.log("data", transaction.crud);
TypeScript says the type of transaction.crud is CrudEntry[], but this is what I get from the console.log:
[{"data": [Object], "id": "67ebfcb34b14c2a8b140b4e5", "op": "PUT", "op_id": 4, "tx_id": 4, "type": "mytablename"}]
For this reason my upload is failing, due to expecting the data to be something like: "op
is a CrudEntry"
const record = {
table: op.table,
id: op.id,
op: op.op,
data: op.opData,
};
Metadata
Metadata
Assignees
Labels
No labels