It's just like , but the callback is expected to be of type callback(error, result)
.
import * as fs from 'fs';const readFileAsObservable = bindNodeCallback(fs.readFile);const result = readFileAsObservable('./roadNames.txt', 'utf8');result.subscribe(x => console.log(x), e => console.error(e));