Removed all instances of BinaryLike.t and StringBuffer.t in API type definitions.
Replaced them with Buffer.t.
Removed functions that would mandate string args (E.g. functions that accept an encoding argument and then expect a string to be passed instead of the default Buffer instance)
Things to note:
The FS module might need to be reworked a little bit. I'm not sure whether to leave arguments for file paths as type string or change them to Buffer.t. Not a huge deal either way, most likely. In either case, I change the "data" arguments for things like writeFile to be Buffer.t. I'm a little less concerned about passing file names as buffers...
P.S.
This really simplifies the API a lot. I think it will work out really well for the most part. There may be some edge cases we aren't considering, but edge cases are okay in my book. We can always address those situations as they come up.
BinaryLike.t
andStringBuffer.t
in API type definitions.Buffer.t
.encoding
argument and then expect a string to be passed instead of the defaultBuffer
instance)Things to note:
The
FS
module might need to be reworked a little bit. I'm not sure whether to leave arguments for file paths as typestring
or change them toBuffer.t
. Not a huge deal either way, most likely. In either case, I change the "data" arguments for things likewriteFile
to beBuffer.t
. I'm a little less concerned about passing file names as buffers...P.S.
This really simplifies the API a lot. I think it will work out really well for the most part. There may be some edge cases we aren't considering, but edge cases are okay in my book. We can always address those situations as they come up.