mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Fix build type error (#38525)
This commit is contained in:
@@ -649,14 +649,14 @@ namespace vfs {
|
||||
*
|
||||
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
||||
*/
|
||||
public readFileSync(path: string, encoding: string): string;
|
||||
public readFileSync(path: string, encoding: BufferEncoding): string;
|
||||
/**
|
||||
* Read from a file.
|
||||
*
|
||||
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
||||
*/
|
||||
public readFileSync(path: string, encoding?: string | null): string | Buffer;
|
||||
public readFileSync(path: string, encoding: string | null = null) { // eslint-disable-line no-null/no-null
|
||||
public readFileSync(path: string, encoding?: BufferEncoding | null): string | Buffer;
|
||||
public readFileSync(path: string, encoding: BufferEncoding | null = null) { // eslint-disable-line no-null/no-null
|
||||
const { node } = this._walk(this._resolve(path));
|
||||
if (!node) throw createIOError("ENOENT");
|
||||
if (isDirectory(node)) throw createIOError("EISDIR");
|
||||
|
||||
Reference in New Issue
Block a user