Skip to content

Commit e856bc0

Browse files
Kingwltypescript-bot
authored andcommitted
Cherry-pick PR microsoft#38525 into release-3.9
Component commits: 19624fa Fix build type error
1 parent 3d5f66b commit e856bc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: 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)