Closed mozrat closed 1 year ago
This seems like an fault on our side.
Could you try and replace the new definitions with the following version and report back.
/**
* Interface for nodes fs module
*/
export interface VMFS {
/** Implements fs.statSync */
statSync: typeof fs.statSync;
/** Implements fs.readFileSync */
readFileSync: typeof fs.readFileSync;
}
/**
* Interface for nodes path module
*/
export interface VMPath {
/** Implements path.resolve */
resolve: typeof pa.resolve;
/** Implements path.isAbsolute */
isAbsolute: typeof pa.isAbsolute;
/** Implements path.join */
join: typeof pa.join;
/** Implements path.basename */
basename: typeof pa.basename;
/** Implements path.dirname */
dirname: typeof pa.dirname;
}
/**
* Custom file system which abstracts functions from node's fs and path modules.
*/
export interface VMFileSystemInterface extends VMFS, VMPath {
/** Implements (sep) => sep === path.sep */
isSeparator(char: string): boolean;
}
/**
* Implementation of a default file system.
*/
export class VMFileSystem implements VMFileSystemInterface {
constructor(options?: { fs?: VMFS, path?: VMPath });
/** Implements fs.statSync */
statSync: typeof fs.statSync;
/** Implements fs.readFileSync */
readFileSync: typeof fs.readFileSync;
/** Implements path.resolve */
resolve: typeof pa.resolve;
/** Implements path.isAbsolute */
isAbsolute: typeof pa.isAbsolute;
/** Implements path.join */
join: typeof pa.join;
/** Implements path.basename */
basename: typeof pa.basename;
/** Implements path.dirname */
dirname: typeof pa.dirname;
/** Implements (sep) => sep === path.sep */
isSeparator(char: string): boolean;
}
I can confirm that the updated typescript definitions fix the compilation issue for me.
Should be fixed now. If anyone knows a GitHub action that can be used to check the index.d.ts
file please let me know.
I believe that 3.9.12 does not compile properly with typescript 4.7.4
Is there now a minimum typescript version that you support, and could that be documented
Thanks for a fantastic library.