From aa3428bea8460de571d8c7de88d2bd83a0ee6f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20=C5=85ikiforovs?= Date: Sat, 14 May 2016 20:04:59 +0300 Subject: [PATCH] ssh2: some options were not optional in ConnectConfig (#9310) --- ssh2/ssh2-tests.ts | 9 +++++++++ ssh2/ssh2.d.ts | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ssh2/ssh2-tests.ts b/ssh2/ssh2-tests.ts index d41f146dd0..da3195062d 100644 --- a/ssh2/ssh2-tests.ts +++ b/ssh2/ssh2-tests.ts @@ -293,6 +293,15 @@ conn.on('ready', () => { password: 'honk' }); +// ConnectConfig + +const sshconfig: ssh2.ConnectConfig = { + host: 'localhost', + port: 22, + username: 'ubuntu', + password: 'password' +}; + // // # Server Examples // diff --git a/ssh2/ssh2.d.ts b/ssh2/ssh2.d.ts index bae9ac653a..9e9e010825 100644 --- a/ssh2/ssh2.d.ts +++ b/ssh2/ssh2.d.ts @@ -109,7 +109,7 @@ declare module "ssh2" { * @description Try keyboard-interactive user authentication if primary user authentication method fails. * If you set this to `true`, you need to handle the `keyboard-interactive` event. */ - tryKeyboard: boolean; + tryKeyboard?: boolean; /** * @description How often (in milliseconds) to send SSH-level keepalive packets to the server * (in a similar way as OpenSSH's ServerAliveInterval config option). Set to 0 to disable. @@ -145,7 +145,7 @@ declare module "ssh2" { /** * @description Set this to a function that receives a single string argument to get detailed (local) debug information. */ - debug: (information: string) => any; + debug?: (information: string) => any; } interface ExecOption {