@@ -1457,17 +1457,12 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1457
1457
* // This won't trigger any callback
1458
1458
* db.run("INSERT INTO users VALUES (2, 'Bob', 1)");
1459
1459
*
1460
- * @param {function|null } callback -
1461
- * Callback to be executed whenever a row changes.
1462
- * Set to `null` to unregister the callback.
1463
- * @param {string } callback.operation -
1464
- * 'insert', 'update', or 'delete'
1465
- * @param {string } callback.database -
1466
- * database where the change occurred
1467
- * @param {string } callback.table -
1468
- * table where the change occurred
1469
- * @param {number } callback.rowId -
1470
- * rowid of the changed row
1460
+ * @param {Database~UpdateHookCallback|null } callback
1461
+ * - Callback to be executed when a row changes. Takes the type of change,
1462
+ * the name of the database, the name of the table, and the row id of the
1463
+ * changed row.
1464
+ * - Set to `null` to unregister.
1465
+ * @returns {void }
1471
1466
*/
1472
1467
Database . prototype [ "updateHook" ] = function updateHook ( callback ) {
1473
1468
if ( this . updateHookFunctionPtr ) {
@@ -1528,6 +1523,18 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1528
1523
) ;
1529
1524
} ;
1530
1525
1526
+ /**
1527
+ * @callback Database~UpdateHookCallback
1528
+ * @param {'insert'|'update'|'delete' } operation
1529
+ * - The type of change that occurred
1530
+ * @param {string } database
1531
+ * - The name of the database where the change occurred
1532
+ * @param {string } table
1533
+ * - The name of the database's table where the change occurred
1534
+ * @param {number } rowId
1535
+ * - The [rowid](https://www.sqlite.org/rowidtable.html) of the changed row
1536
+ */
1537
+
1531
1538
// export Database to Module
1532
1539
Module . Database = Database ;
1533
1540
} ;
0 commit comments