Skip to content

Commit

Permalink
Renamed PreloadFile type parameter
Browse files Browse the repository at this point in the history
Updated AsyncStoreFS doc comment
  • Loading branch information
james-pre committed Mar 20, 2024
1 parent 9052dc1 commit 4f7a35b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/backends/AsyncStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ export interface AsyncRWTransaction extends AsyncROTransaction {
abort(): Promise<void>;
}

/**
* Async preload file for usage with AsyncStore
*/
export class AsyncFile extends PreloadFile<AsyncStoreFS> {
constructor(_fs: AsyncStoreFS, _path: string, _flag: FileFlag, _stat: Stats, contents?: Uint8Array) {
super(_fs, _path, _flag, _stat, contents);
Expand Down Expand Up @@ -159,8 +162,8 @@ export interface AsyncStoreOptions {
}

/**
* An "Asynchronous key-value file system". Stores data to/retrieves data from
* an underlying asynchronous key-value store.
* An asynchronous file system which uses an async store to store its data.
* @see AsyncStore
*/
export class AsyncStoreFS extends Async(FileSystem) {
protected store: AsyncStore;
Expand Down
4 changes: 2 additions & 2 deletions src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export abstract class File {
* extend this class and implement those two methods.
* @todo 'close' lever that disables functionality once closed.
*/
export abstract class PreloadFile<T extends FileSystem> extends File {
export abstract class PreloadFile<FS extends FileSystem> extends File {
protected _position: number = 0;
protected _dirty: boolean = false;
/**
Expand All @@ -417,7 +417,7 @@ export abstract class PreloadFile<T extends FileSystem> extends File {
/**
* The file system that created the file.
*/
protected fs: T,
protected fs: FS,
/**
* Path to the file
*/
Expand Down

0 comments on commit 4f7a35b

Please sign in to comment.