File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -649,14 +649,14 @@ namespace vfs {
649
649
*
650
650
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
651
651
*/
652
- public readFileSync ( path : string , encoding : string ) : string ;
652
+ public readFileSync ( path : string , encoding : BufferEncoding ) : string ;
653
653
/**
654
654
* Read from a file.
655
655
*
656
656
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
657
657
*/
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
660
660
const { node } = this . _walk ( this . _resolve ( path ) ) ;
661
661
if ( ! node ) throw createIOError ( "ENOENT" ) ;
662
662
if ( isDirectory ( node ) ) throw createIOError ( "EISDIR" ) ;
You can’t perform that action at this time.
0 commit comments