@types/node 10.12.20 → 10.12.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +2 -2
- node/assert.d.ts +52 -0
- node/async_hooks.d.ts +144 -0
- node/base.d.ts +41 -0
- node/buffer.d.ts +12 -0
- node/child_process.d.ts +358 -0
- node/cluster.d.ts +261 -0
- node/console.d.ts +3 -0
- node/constants.d.ts +279 -0
- node/crypto.d.ts +369 -0
- node/dgram.d.ts +97 -0
- node/dns.d.ts +292 -0
- node/domain.d.ts +16 -0
- node/events.d.ts +29 -0
- node/fs.d.ts +2272 -0
- node/globals.d.ts +995 -0
- node/http.d.ts +247 -0
- node/http2.d.ts +861 -0
- node/https.d.ts +37 -0
- node/index.d.ts +19 -9157
- node/inspector.d.ts +0 -1
- node/module.d.ts +3 -0
- node/net.d.ts +251 -0
- node/os.d.ts +192 -0
- node/package.json +9 -2
- node/path.d.ts +159 -0
- node/perf_hooks.d.ts +241 -0
- node/process.d.ts +3 -0
- node/punycode.d.ts +12 -0
- node/querystring.d.ts +17 -0
- node/readline.d.ts +135 -0
- node/repl.d.ts +372 -0
- node/stream.d.ts +294 -0
- node/string_decoder.d.ts +9 -0
- node/timers.d.ts +16 -0
- node/tls.d.ts +371 -0
- node/trace_events.d.ts +61 -0
- node/ts3.1/index.d.ts +18 -0
- node/ts3.1/util.d.ts +10 -0
- node/tty.d.ts +15 -0
- node/url.d.ts +104 -0
- node/util.d.ts +169 -0
- node/v8.d.ts +28 -0
- node/vm.d.ts +64 -0
- node/worker_threads.d.ts +124 -0
- node/zlib.d.ts +141 -0
node/https.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare module "https" {
|
|
2
|
+
import * as tls from "tls";
|
|
3
|
+
import * as events from "events";
|
|
4
|
+
import * as http from "http";
|
|
5
|
+
import { URL } from "url";
|
|
6
|
+
|
|
7
|
+
type ServerOptions = tls.SecureContextOptions & tls.TlsOptions;
|
|
8
|
+
|
|
9
|
+
type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
|
|
10
|
+
rejectUnauthorized?: boolean; // Defaults to true
|
|
11
|
+
servername?: string; // SNI TLS Extension
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
15
|
+
rejectUnauthorized?: boolean;
|
|
16
|
+
maxCachedSessions?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class Agent extends http.Agent {
|
|
20
|
+
constructor(options?: AgentOptions);
|
|
21
|
+
options: AgentOptions;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
class Server extends tls.Server {
|
|
25
|
+
setTimeout(callback: () => void): this;
|
|
26
|
+
setTimeout(msecs?: number, callback?: () => void): this;
|
|
27
|
+
timeout: number;
|
|
28
|
+
keepAliveTimeout: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function createServer(options: ServerOptions, requestListener?: (req: http.IncomingMessage, res: http.ServerResponse) => void): Server;
|
|
32
|
+
function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
33
|
+
function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
34
|
+
function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
35
|
+
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
|
|
36
|
+
let globalAgent: Agent;
|
|
37
|
+
}
|