I am trying to use rxjs 5 to write a Node.js server in TypeScript, but I hit an error when converting fs.readFile to its rxjs form. I expect the following code
fs.readFile
To be honest i haven't found a solution, but in order to make it work, i cast it to a function.
(Rx.Observable.bindNodeCallback(fs.readFile))('./file.txt', 'utf8').subscribe();