-
Notifications
You must be signed in to change notification settings - Fork 682
Expand file tree
/
Copy pathssh-config.d.ts
More file actions
45 lines (36 loc) · 1.11 KB
/
ssh-config.d.ts
File metadata and controls
45 lines (36 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
declare module "ssh-config" {
namespace SSHConfig {
var DIRECTIVE: number; // 1
var COMMENT: number; // 2
interface SSHConfigFindOptions {
Host?: string;
Match?: string;
}
interface ConfigComment {
type: typeof COMMENT;
content: string;
before: string;
after: string;
}
interface ConfigDirective {
type: typeof DIRECTIVE;
before: string;
after: string;
param: string;
value: string;
separator: string;
}
interface ConfigHostDirective extends ConfigDirective {
config: SSHConfig;
}
type ConfigMatchDirective = ConfigHostDirective;
type Config = ConfigComment | ConfigDirective | ConfigHostDirective | ConfigMatchDirective;
interface SSHConfig extends Array<Config> {
find(arg: any): any; // https://github.com/dotnil/ssh-config/blob/40b55c0e31790dd78a0d4364b0e8a0a358293385/index.js#L61
}
// function find(config: SSHConfig, options?: SSHConfigFindOptions): ;
function parse(str: string): SSHConfig;
function stringify(config: SSHConfig): string;
}
export = SSHConfig;
}