How to pass options to a function (fs.readFile) wrapped inside bindNodeCallback? #7075
Unanswered
adellamaggiora
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello I want to use fs.readFile that has the current signature:
fs.readFile: (path: number | fs.PathLike, options: { encoding: string, flag: string }, callback: Function) => void;
but when I wrap it inside bindNodeCallback
const customRead: (path: number | fs.PathLike) => Observable<Buffer> = bindNodeCallback(fs.readFile);
I got this signature that doesn't allow me to pass options to fs.readFile function
How can I deal with it?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions