Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve) => {
if (!db.createWriteStream) {
db = levelws(db);
}
this
// @ts-ignore FIXME, we need to properly check the full file
.createScratchReadStream(scratch)
// @ts-ignore FIXME, we need to properly check the full file
.pipe(
// @ts-ignore FIXME, we need to properly check the full file
db.createWriteStream(encoder.options)
)
.on('close', resolve);
});
})