Fix compile

This commit is contained in:
Andras Schmelczer 2025-11-23 16:49:56 +00:00
parent 340c347841
commit c4da1426b1
5 changed files with 6 additions and 16 deletions

View file

@ -187,7 +187,7 @@ async function main(): Promise<void> {
); );
fileWatcher.stop(); fileWatcher.stop();
await client.waitAndStop(); await client.destroy();
console.log(colorize("Shutdown complete", "green")); console.log(colorize("Shutdown complete", "green"));
process.exit(0); process.exit(0);
}; };

View file

@ -180,7 +180,9 @@ export default class VaultLinkPlugin extends Plugin {
this.app.workspace, this.app.workspace,
client client
); );
this.register(() => { editorStatusDisplayManager.dispose(); }); this.register(() => {
editorStatusDisplayManager.dispose();
});
} }
private addRibbonIcons(): void { private addRibbonIcons(): void {

View file

@ -326,7 +326,7 @@ export class Database {
}); });
} }
public save(): Promise<void> { public async save(): Promise<void> {
return this.saveData({ return this.saveData({
documents: this.resolvedDocuments.map( documents: this.resolvedDocuments.map(
({ relativePath, documentId, metadata }) => ({ ({ relativePath, documentId, metadata }) => ({

View file

@ -101,18 +101,6 @@ describe("FetchController", () => {
assert.strictEqual(await response.text(), "OK"); assert.strictEqual(await response.text(), "OK");
}); });
it("should throw when finishing reset without starting", () => {
const logger = new Logger();
const controller = new FetchController(true, logger);
assert.throws(
() => { controller.finishReset(); },
(error: unknown) =>
error instanceof Error &&
error.message === "Cannot finish reset when not resetting"
);
});
it("should defer canFetch changes during reset", async () => { it("should defer canFetch changes during reset", async () => {
const logger = new Logger(); const logger = new Logger();
const controller = new FetchController(false, logger); const controller = new FetchController(false, logger);

View file

@ -30,7 +30,7 @@ export class SyncClient {
private hasStartedOfflineSync = false; private hasStartedOfflineSync = false;
private hasFinishedOfflineSync = false; private hasFinishedOfflineSync = false;
private hasStarted = false; private hasStarted = false;
private hasBeenDestroyed = false; private readonly hasBeenDestroyed = false;
private unloadTelemetry?: () => void; private unloadTelemetry?: () => void;
private constructor( private constructor(