Skip to content

Commit 726b933

Browse files
committed
Fix build type error
1 parent 9185734 commit 726b933

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/harness/vfsUtil.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -649,14 +649,14 @@ namespace vfs {
649649
*
650650
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
651651
*/
652-
public readFileSync(path: string, encoding: string): string;
652+
public readFileSync(path: string, encoding: BufferEncoding): string;
653653
/**
654654
* Read from a file.
655655
*
656656
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
657657
*/
658-
public readFileSync(path: string, encoding?: string | null): string | Buffer;
659-
public readFileSync(path: string, encoding: string | null = null) { // eslint-disable-line no-null/no-null
658+
public readFileSync(path: string, encoding?: BufferEncoding | null): string | Buffer;
659+
public readFileSync(path: string, encoding: BufferEncoding | null = null) { // eslint-disable-line no-null/no-null
660660
const { node } = this._walk(this._resolve(path));
661661
if (!node) throw createIOError("ENOENT");
662662
if (isDirectory(node)) throw createIOError("EISDIR");

0 commit comments

Comments
 (0)