Skip to content

Commit 9506eb3

Browse files
committed
fix(fs): bug in node fs readFileSync params
Signed-off-by: Sam Gammon <sam@elide.ventures>
1 parent 72ed751 commit 9506eb3

File tree

1 file changed

+2
-2
lines changed
  • elide/runtime/js/modules/fs

1 file changed

+2
-2
lines changed

elide/runtime/js/modules/fs/fs.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ export function readFile(path: string | Buffer | URL, options: { encoding: strin
399399
* @param options Options for reading the file
400400
* @returns The file contents
401401
*/
402-
export function readFileSync(path: string | Buffer | URL, options: { encoding: string; flag?: string; }): string {
403-
return internals.readFileSync(path, options);
402+
export function readFileSync(path: string | Buffer | URL, options?: string | { encoding?: string; flag?: string; }): string {
403+
return internals.readFileSync(path, options || null);
404404
}
405405

406406
/**

0 commit comments

Comments
 (0)