Skip to content

Commit 7609155

Browse files
Mark dispose as Deprecated (#683)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 47a2302 commit 7609155

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/healthy-grapes-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@powersync/common': patch
3+
---
4+
5+
Marked AbstractPowerSyncDatabase.dispose method as deprecated. The AbstractPowerSyncDatabase.close method should be used instead.

packages/common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,14 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
466466
};
467467
}
468468

469+
/**
470+
* @deprecated Use {@link AbstractPowerSyncDatabase#close} instead.
471+
* Clears all listeners registered by {@link AbstractPowerSyncDatabase#registerListener}.
472+
*/
473+
dispose(): void {
474+
return super.dispose();
475+
}
476+
469477
/**
470478
* Locking mechanism for exclusively running critical portions of connect/disconnect operations.
471479
* Locking here is mostly only important on web for multiple tab scenarios.

0 commit comments

Comments
 (0)