File tree Expand file tree Collapse file tree
src/vs/platform/state/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,14 +11,16 @@ import { isUndefined, isUndefinedOrNull } from 'vs/base/common/types';
1111import { IStateService } from 'vs/platform/state/common/state' ;
1212import { ILogService } from 'vs/platform/log/common/log' ;
1313
14+ type StorageDatebase = { [ key : string ] : any ; } ;
15+
1416export 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
You can’t perform that action at this time.
0 commit comments