forked from localtunnel/localtunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
54 lines (44 loc) · 1.37 KB
/
index.d.ts
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
46
47
48
49
50
51
52
53
54
/// <reference types="node" />
import { EventEmitter } from "events";
export = localtunnel;
declare function localtunnel(
port: number | localtunnel.TunnelConfig & { port: number },
): Promise<localtunnel.Tunnel>;
declare function localtunnel(
opts: localtunnel.TunnelConfig & { port: number },
callback: localtunnel.TunnelCallback,
): localtunnel.Tunnel;
declare function localtunnel(
port: number,
opts: localtunnel.TunnelConfig,
): Promise<localtunnel.Tunnel>;
declare function localtunnel(
port: number,
opts: localtunnel.TunnelConfig,
callback: localtunnel.TunnelCallback,
): localtunnel.Tunnel;
declare namespace localtunnel {
type TunnelCallback = (
err?: string,
tunnel?: Tunnel,
) => void;
interface TunnelConfig {
subdomain?: string | undefined;
host?: string | undefined;
local_host?: string | undefined;
local_https?: boolean | undefined;
local_cert?: string | undefined;
local_key?: string | undefined;
local_ca?: string | undefined;
allow_invalid_cert?: boolean | undefined;
}
interface Tunnel extends EventEmitter {
url: string;
tunnelCluster: TunnelCluster;
open(cb: ((err: string) => void) | (() => void)): void;
close(): void;
}
interface TunnelCluster extends EventEmitter {
open(): void;
}
}