TheSpyder / TheSpyder/rescript-nodejs

readFileSyncWith should return string

Open
#27 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
ReScript
Stars
90
Forks
22
PR merge metrics
No merged PRs in 30d

Description

--- a/src/Fs.res
+++ b/src/Fs.res
@@ -248,7 +248,7 @@ external openSyncWith: (string, ~flag: Flag.t=?, ~mode: int=?) => fd = "openSync
 @module("node:fs")
 external readFileSync: string => Buffer.t = "readFileSync"
 @module("node:fs")
-external readFileSyncWith: (string, readFileOptions) => Buffer.t = "readFileSync"
+external readFileSyncWith: (string, readFileOptions) => string = "readFileSync"

 @module("node:fs") external existsSync: string => bool = "existsSync"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The requested declaration is in src/Fs.res; start at readFileSyncWith and compare its return type with the Node.js fs readFileSync API. Verify the binding with the repository's available checks or tests, and consider the issue done when the declaration returns string without breaking existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.