Closed eliot-akira closed 6 years ago
The example code in README.md results in an error: fdb.openSync is not a function. This is because the following line:
README.md
fdb.openSync is not a function
const fdb = require('foundationdb')
..results in importing an object of the shape:
{ default: { FDBError: [Function: FDBError], configNetwork: [Function: configNetwork], ... } }
So I had to require the module like this:
const fdb = require('foundationdb').default
Related to: Microsoft/TypeScript#2719 - ES6 Modules default exports interop with CommonJS
Thanks for catching that. Fixed & republished.
The example code in
README.md
results in an error:fdb.openSync is not a function
. This is because the following line:..results in importing an object of the shape:
So I had to require the module like this:
Related to: Microsoft/TypeScript#2719 - ES6 Modules default exports interop with CommonJS