chore: enforce erasable TypeScript syntax

This commit is contained in:
Mario Zechner
2026-05-19 23:15:39 +02:00
parent 48b6510c18
commit 06c6c324d7
17 changed files with 122 additions and 74 deletions

View File

@@ -50,7 +50,11 @@ export interface AuthStorageBackend {
}
export class FileAuthStorageBackend implements AuthStorageBackend {
constructor(private authPath: string = join(getAgentDir(), "auth.json")) {}
private authPath: string;
constructor(authPath: string = join(getAgentDir(), "auth.json")) {
this.authPath = authPath;
}
private ensureParentDir(): void {
const dir = dirname(this.authPath);
@@ -194,8 +198,10 @@ export class AuthStorage {
private fallbackResolver?: (provider: string) => string | undefined;
private loadError: Error | null = null;
private errors: Error[] = [];
private storage: AuthStorageBackend;
private constructor(private storage: AuthStorageBackend) {
private constructor(storage: AuthStorageBackend) {
this.storage = storage;
this.reload();
}