Closed jeffrson closed 3 years ago
Currently it is exposed as below var SFTP = require('ssh2-promise').SFTP
Then it's just "any".
Workaround:
import Ssh from "ssh2-promise";
const dummy = () => new Ssh({}).sftp();
type SFTP = ReturnType<typeof dummy>;
Now we support SFTP type
//without esModuleInterop
import SFTP = require('ssh2-promise/lib/sftp')
//with esModuleInterop
import SFTP from 'ssh2-promise/lib/sftp'
Hi, would love to see typescript support like
import { SFTP } from 'ssh2-promise'
Currently there seems to be no way to access the type of SFTP (in class or interface) at all.