Skip to content

Commit

Permalink
type improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensJourney committed Nov 22, 2023
1 parent 339c4e2 commit f96dac6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DBAdapter } from 'src/db/DBAdapter';
import { DBAdapter } from '../db/DBAdapter';
import { Schema } from '../db/schema/Schema';
import { AbstractPowerSyncDatabase, PowerSyncDatabaseOptions } from './AbstractPowerSyncDatabase';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const DEFAULT_STREAMING_SYNC_OPTIONS = {
};

export abstract class AbstractStreamingSyncImplementation extends BaseObserver<StreamingSyncImplementationListener> {
protected _lastSyncedAt: Date;
protected _lastSyncedAt: Date | null;
protected options: AbstractStreamingSyncImplementationOptions;

private isUploadingCrud: boolean;
Expand All @@ -61,6 +61,7 @@ export abstract class AbstractStreamingSyncImplementation extends BaseObserver<S
this.options = { ...DEFAULT_STREAMING_SYNC_OPTIONS, ...options };
this.isUploadingCrud = false;
this._isConnected = false;
this._lastSyncedAt = null;
}

get lastSyncedAt() {
Expand Down Expand Up @@ -305,7 +306,7 @@ export abstract class AbstractStreamingSyncImplementation extends BaseObserver<S
}
}

private updateSyncStatus(connected: boolean, lastSyncedAt?: Date) {
protected updateSyncStatus(connected: boolean, lastSyncedAt?: Date) {
const takeSnapShot = () => [this._isConnected, this._lastSyncedAt?.valueOf()];

const previousValues = takeSnapShot();
Expand Down

0 comments on commit f96dac6

Please sign in to comment.