11import Stats from './Stats' ;
22import Dirent from './Dirent' ;
33import {
4- Volume as _Volume ,
4+ Volume ,
55 StatWatcher ,
66 FSWatcher ,
77 toUnixTimestamp ,
@@ -16,13 +16,12 @@ import { fsSynchronousApiList } from './node/lists/fsSynchronousApiList';
1616import { fsCallbackApiList } from './node/lists/fsCallbackApiList' ;
1717const { F_OK , R_OK , W_OK , X_OK } = constants ;
1818
19- export { DirectoryJSON , NestedDirectoryJSON } ;
20- export const Volume = _Volume ;
19+ export { DirectoryJSON , NestedDirectoryJSON , Volume } ;
2120
2221// Default volume.
23- export const vol = new _Volume ( ) ;
22+ export const vol = new Volume ( ) ;
2423
25- export interface IFs extends _Volume {
24+ export interface IFs extends Volume {
2625 constants : typeof constants ;
2726 Stats : new ( ...args ) => Stats ;
2827 Dirent : new ( ...args ) => Dirent ;
@@ -34,7 +33,7 @@ export interface IFs extends _Volume {
3433 _toUnixTimestamp ;
3534}
3635
37- export function createFsFromVolume ( vol : _Volume ) : IFs {
36+ export function createFsFromVolume ( vol : Volume ) : IFs {
3837 const fs = { F_OK , R_OK , W_OK , X_OK , constants, Stats, Dirent } as any as IFs ;
3938
4039 // Bind FS methods.
@@ -65,13 +64,13 @@ export const fs: IFs = createFsFromVolume(vol);
6564 * @returns A `memfs` file system instance, which is a drop-in replacement for
6665 * the `fs` module.
6766 */
68- export const memfs = ( json : NestedDirectoryJSON = { } , cwd : string = '/' ) : { fs : IFs ; vol : _Volume } => {
67+ export const memfs = ( json : NestedDirectoryJSON = { } , cwd : string = '/' ) : { fs : IFs ; vol : Volume } => {
6968 const vol = Volume . fromNestedJSON ( json , cwd ) ;
7069 const fs = createFsFromVolume ( vol ) ;
7170 return { fs, vol } ;
7271} ;
7372
74- export type IFsWithVolume = IFs & { __vol : _Volume } ;
73+ export type IFsWithVolume = IFs & { __vol : Volume } ;
7574
7675declare let module ;
7776module . exports = { ...module . exports , ...fs } ;
0 commit comments