Closed niyarlatotep closed 5 years ago
@Niyarlatotep Yes, good idea, Please feel free to open a PR for this.
Why change the API and break existing code?
@Niyarlatotep You should be able to just use esModuleInterop
TypeScript option, which is suggested, by TypeScript, to be turned on.
@cinderblock Yes, thank you!
When I try to import modules as es6 modules like this:
import * as SSH2Promise from 'SSH2Promise';
I got error 'This module can only be referenced with ECMAScript imports/exports by turning on the esModuleInterop' flag and referencing its default export'. Although the described in README methodimport SSH2Promise = require('ssh2-promise');
works well it would be nice to make exports in es6 style:export {SSH2Promise}
unfortunately it probably will break require import in using code.