File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,14 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
544544 this . iterateListeners ( ( l ) => l . statusChanged ?.( this . currentStatus ) ) ;
545545 }
546546
547+ /**
548+ * Create a sync stream to query its status or to subscribe to it.
549+ *
550+ * @param name The name of the stream to subscribe to.
551+ * @param params Optional parameters for the stream subscription.
552+ * @returns A {@link SyncStream} instance that can be subscribed to.
553+ * @experimental Sync streams are currently in alpha.
554+ */
547555 syncStream ( name : string , params ?: Record < string , any > ) : SyncStream {
548556 return this . connectionManager . stream ( this . subscriptions , name , params ?? null ) ;
549557 }
Original file line number Diff line number Diff line change @@ -122,13 +122,17 @@ export class SyncStatus {
122122 *
123123 * This returns null when the database is currently being opened and we don't have reliable information about all
124124 * included streams yet.
125+ *
126+ * @experimental Sync streams are currently in alpha.
125127 */
126128 get syncStreams ( ) : SyncStreamStatus [ ] | undefined {
127129 return this . options . dataFlow ?. internalStreamSubscriptions ?. map ( ( core ) => new SyncStreamStatusView ( this , core ) ) ;
128130 }
129131
130132 /**
131133 * If the `stream` appears in {@link syncStreams}, returns the current status for that stream.
134+ *
135+ * @experimental Sync streams are currently in alpha.
132136 */
133137 forStream ( stream : SyncStreamDescription ) : SyncStreamStatus | undefined {
134138 const asJson = JSON . stringify ( stream . parameters ) ;
You can’t perform that action at this time.
0 commit comments