Skip to content

Commit 45ccecf

Browse files
committed
Add explicit index signature
microsoft#76442
1 parent 83e9054 commit 45ccecf

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/vs/platform/state/node/stateService.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ import { isUndefined, isUndefinedOrNull } from 'vs/base/common/types';
1111
import { IStateService } from 'vs/platform/state/common/state';
1212
import { ILogService } from 'vs/platform/log/common/log';
1313

14+
type StorageDatebase = { [key: string]: any; };
15+
1416
export class FileStorage {
1517

16-
private _database: object | null = null;
18+
private _database: StorageDatebase | null = null;
1719
private lastFlushedSerializedDatabase: string | null = null;
1820

1921
constructor(private dbPath: string, private onError: (error: Error) => void) { }
2022

21-
private get database(): object {
23+
private get database(): StorageDatebase {
2224
if (!this._database) {
2325
this._database = this.loadSync();
2426
}
@@ -40,7 +42,7 @@ export class FileStorage {
4042
this._database = database;
4143
}
4244

43-
private loadSync(): object {
45+
private loadSync(): StorageDatebase {
4446
try {
4547
this.lastFlushedSerializedDatabase = fs.readFileSync(this.dbPath).toString();
4648

@@ -54,7 +56,7 @@ export class FileStorage {
5456
}
5557
}
5658

57-
private async loadAsync(): Promise<object> {
59+
private async loadAsync(): Promise<StorageDatebase> {
5860
try {
5961
this.lastFlushedSerializedDatabase = (await readFile(this.dbPath)).toString();
6062

0 commit comments

Comments
 (0)