@types/node 10.12.8 → 10.12.12
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 +1 -1
- node/index.d.ts +290 -31
- node/package.json +2 -2
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 03 Dec 2018 18:29:19 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
|
|
14
14
|
|
node/index.d.ts
CHANGED
|
@@ -1126,10 +1126,10 @@ declare module "http" {
|
|
|
1126
1126
|
'access-control-allow-headers'?: string;
|
|
1127
1127
|
'accept-patch'?: string;
|
|
1128
1128
|
'accept-ranges'?: string;
|
|
1129
|
-
'authorization'?: string;
|
|
1130
1129
|
'age'?: string;
|
|
1131
1130
|
'allow'?: string;
|
|
1132
1131
|
'alt-svc'?: string;
|
|
1132
|
+
'authorization'?: string;
|
|
1133
1133
|
'cache-control'?: string;
|
|
1134
1134
|
'connection'?: string;
|
|
1135
1135
|
'content-disposition'?: string;
|
|
@@ -1139,14 +1139,24 @@ declare module "http" {
|
|
|
1139
1139
|
'content-location'?: string;
|
|
1140
1140
|
'content-range'?: string;
|
|
1141
1141
|
'content-type'?: string;
|
|
1142
|
+
'cookie'?: string;
|
|
1142
1143
|
'date'?: string;
|
|
1144
|
+
'expect'?: string;
|
|
1143
1145
|
'expires'?: string;
|
|
1146
|
+
'forwarded'?: string;
|
|
1147
|
+
'from'?: string;
|
|
1144
1148
|
'host'?: string;
|
|
1149
|
+
'if-match'?: string;
|
|
1150
|
+
'if-modified-since'?: string;
|
|
1151
|
+
'if-none-match'?: string;
|
|
1152
|
+
'if-unmodified-since'?: string;
|
|
1145
1153
|
'last-modified'?: string;
|
|
1146
1154
|
'location'?: string;
|
|
1147
1155
|
'pragma'?: string;
|
|
1148
1156
|
'proxy-authenticate'?: string;
|
|
1157
|
+
'proxy-authorization'?: string;
|
|
1149
1158
|
'public-key-pins'?: string;
|
|
1159
|
+
'range'?: string;
|
|
1150
1160
|
'referer'?: string;
|
|
1151
1161
|
'retry-after'?: string;
|
|
1152
1162
|
'set-cookie'?: string[];
|
|
@@ -1992,8 +2002,9 @@ declare module "punycode" {
|
|
|
1992
2002
|
}
|
|
1993
2003
|
|
|
1994
2004
|
declare module "repl" {
|
|
1995
|
-
import {
|
|
2005
|
+
import { Interface, Completer, AsyncCompleter } from "readline";
|
|
1996
2006
|
import { Context } from "vm";
|
|
2007
|
+
import { InspectOptions } from "util";
|
|
1997
2008
|
|
|
1998
2009
|
interface ReplOptions {
|
|
1999
2010
|
/**
|
|
@@ -2014,7 +2025,8 @@ declare module "repl" {
|
|
|
2014
2025
|
/**
|
|
2015
2026
|
* If `true`, specifies that the output should be treated as a TTY terminal, and have
|
|
2016
2027
|
* ANSI/VT100 escape codes written to it.
|
|
2017
|
-
* Default: checking the value of the `isTTY` property on the output stream upon
|
|
2028
|
+
* Default: checking the value of the `isTTY` property on the output stream upon
|
|
2029
|
+
* instantiation.
|
|
2018
2030
|
*/
|
|
2019
2031
|
terminal?: boolean;
|
|
2020
2032
|
/**
|
|
@@ -2022,8 +2034,11 @@ declare module "repl" {
|
|
|
2022
2034
|
* Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
|
|
2023
2035
|
* error with `repl.Recoverable` to indicate the input was incomplete and prompt for
|
|
2024
2036
|
* additional lines.
|
|
2037
|
+
*
|
|
2038
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
|
|
2039
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
|
|
2025
2040
|
*/
|
|
2026
|
-
eval?:
|
|
2041
|
+
eval?: REPLEval;
|
|
2027
2042
|
/**
|
|
2028
2043
|
* If `true`, specifies that the default `writer` function should include ANSI color
|
|
2029
2044
|
* styling to REPL output. If a custom `writer` function is provided then this has no
|
|
@@ -2046,16 +2061,26 @@ declare module "repl" {
|
|
|
2046
2061
|
ignoreUndefined?: boolean;
|
|
2047
2062
|
/**
|
|
2048
2063
|
* The function to invoke to format the output of each command before writing to `output`.
|
|
2049
|
-
* Default: `util.inspect
|
|
2064
|
+
* Default: a wrapper for `util.inspect`.
|
|
2065
|
+
*
|
|
2066
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
|
|
2050
2067
|
*/
|
|
2051
|
-
writer?:
|
|
2068
|
+
writer?: REPLWriter;
|
|
2052
2069
|
/**
|
|
2053
|
-
* An optional function used for custom Tab auto completion.
|
|
2054
|
-
*
|
|
2055
|
-
*
|
|
2070
|
+
* An optional function used for custom Tab auto completion.
|
|
2071
|
+
*
|
|
2072
|
+
* @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
|
|
2056
2073
|
*/
|
|
2057
2074
|
completer?: Completer | AsyncCompleter;
|
|
2058
|
-
|
|
2075
|
+
/**
|
|
2076
|
+
* A flag that specifies whether the default evaluator executes all JavaScript commands in
|
|
2077
|
+
* strict mode or default (sloppy) mode.
|
|
2078
|
+
* Accepted values are:
|
|
2079
|
+
* - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
|
|
2080
|
+
* - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
|
|
2081
|
+
* prefacing every repl statement with `'use strict'`.
|
|
2082
|
+
*/
|
|
2083
|
+
replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
|
|
2059
2084
|
/**
|
|
2060
2085
|
* Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
|
|
2061
2086
|
* pressed. This cannot be used together with a custom `eval` function.
|
|
@@ -2064,6 +2089,17 @@ declare module "repl" {
|
|
|
2064
2089
|
breakEvalOnSigint?: boolean;
|
|
2065
2090
|
}
|
|
2066
2091
|
|
|
2092
|
+
type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
|
|
2093
|
+
type REPLWriter = (this: REPLServer, obj: any) => string;
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* This is the default "writer" value, if none is passed in the REPL options,
|
|
2097
|
+
* and it can be overridden by custom print functions.
|
|
2098
|
+
*/
|
|
2099
|
+
const writer: REPLWriter & { options: InspectOptions };
|
|
2100
|
+
|
|
2101
|
+
type REPLCommandAction = (this: REPLServer, text: string) => void;
|
|
2102
|
+
|
|
2067
2103
|
interface REPLCommand {
|
|
2068
2104
|
/**
|
|
2069
2105
|
* Help text to be displayed when `.help` is entered.
|
|
@@ -2072,21 +2108,139 @@ declare module "repl" {
|
|
|
2072
2108
|
/**
|
|
2073
2109
|
* The function to execute, optionally accepting a single string argument.
|
|
2074
2110
|
*/
|
|
2075
|
-
action:
|
|
2111
|
+
action: REPLCommandAction;
|
|
2076
2112
|
}
|
|
2077
2113
|
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2114
|
+
/**
|
|
2115
|
+
* Provides a customizable Read-Eval-Print-Loop (REPL).
|
|
2116
|
+
*
|
|
2117
|
+
* Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those
|
|
2118
|
+
* according to a user-defined evaluation function, then output the result. Input and output
|
|
2119
|
+
* may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`.
|
|
2120
|
+
*
|
|
2121
|
+
* Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style
|
|
2122
|
+
* line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session
|
|
2123
|
+
* state, error recovery, and customizable evaluation functions.
|
|
2124
|
+
*
|
|
2125
|
+
* Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_
|
|
2126
|
+
* be created directly using the JavaScript `new` keyword.
|
|
2127
|
+
*
|
|
2128
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl
|
|
2129
|
+
*/
|
|
2130
|
+
class REPLServer extends Interface {
|
|
2131
|
+
/**
|
|
2132
|
+
* The `vm.Context` provided to the `eval` function to be used for JavaScript
|
|
2133
|
+
* evaluation.
|
|
2134
|
+
*/
|
|
2135
|
+
readonly context: Context;
|
|
2136
|
+
/**
|
|
2137
|
+
* The `Readable` stream from which REPL input will be read.
|
|
2138
|
+
*/
|
|
2139
|
+
readonly inputStream: NodeJS.ReadableStream;
|
|
2140
|
+
/**
|
|
2141
|
+
* The `Writable` stream to which REPL output will be written.
|
|
2142
|
+
*/
|
|
2143
|
+
readonly outputStream: NodeJS.WritableStream;
|
|
2144
|
+
/**
|
|
2145
|
+
* The commands registered via `replServer.defineCommand()`.
|
|
2146
|
+
*/
|
|
2147
|
+
readonly commands: { readonly [name: string]: REPLCommand | undefined };
|
|
2148
|
+
/**
|
|
2149
|
+
* A value indicating whether the REPL is currently in "editor mode".
|
|
2150
|
+
*
|
|
2151
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
|
|
2152
|
+
*/
|
|
2153
|
+
readonly editorMode: boolean;
|
|
2154
|
+
/**
|
|
2155
|
+
* A value indicating whether the `_` variable has been assigned.
|
|
2156
|
+
*
|
|
2157
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
2158
|
+
*/
|
|
2159
|
+
readonly underscoreAssigned: boolean;
|
|
2160
|
+
/**
|
|
2161
|
+
* The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
|
|
2162
|
+
*
|
|
2163
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
2164
|
+
*/
|
|
2165
|
+
readonly last: any;
|
|
2166
|
+
/**
|
|
2167
|
+
* A value indicating whether the `_error` variable has been assigned.
|
|
2168
|
+
*
|
|
2169
|
+
* @since v9.8.0
|
|
2170
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
2171
|
+
*/
|
|
2172
|
+
readonly underscoreErrAssigned: boolean;
|
|
2173
|
+
/**
|
|
2174
|
+
* The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
|
|
2175
|
+
*
|
|
2176
|
+
* @since v9.8.0
|
|
2177
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
2178
|
+
*/
|
|
2179
|
+
readonly lastError: any;
|
|
2180
|
+
/**
|
|
2181
|
+
* Specified in the REPL options, this is the function to be used when evaluating each
|
|
2182
|
+
* given line of input. If not specified in the REPL options, this is an async wrapper
|
|
2183
|
+
* for the JavaScript `eval()` function.
|
|
2184
|
+
*/
|
|
2185
|
+
readonly eval: REPLEval;
|
|
2186
|
+
/**
|
|
2187
|
+
* Specified in the REPL options, this is a value indicating whether the default
|
|
2188
|
+
* `writer` function should include ANSI color styling to REPL output.
|
|
2189
|
+
*/
|
|
2190
|
+
readonly useColors: boolean;
|
|
2191
|
+
/**
|
|
2192
|
+
* Specified in the REPL options, this is a value indicating whether the default `eval`
|
|
2193
|
+
* function will use the JavaScript `global` as the context as opposed to creating a new
|
|
2194
|
+
* separate context for the REPL instance.
|
|
2195
|
+
*/
|
|
2196
|
+
readonly useGlobal: boolean;
|
|
2197
|
+
/**
|
|
2198
|
+
* Specified in the REPL options, this is a value indicating whether the default `writer`
|
|
2199
|
+
* function should output the result of a command if it evaluates to `undefined`.
|
|
2200
|
+
*/
|
|
2201
|
+
readonly ignoreUndefined: boolean;
|
|
2202
|
+
/**
|
|
2203
|
+
* Specified in the REPL options, this is the function to invoke to format the output of
|
|
2204
|
+
* each command before writing to `outputStream`. If not specified in the REPL options,
|
|
2205
|
+
* this will be a wrapper for `util.inspect`.
|
|
2206
|
+
*/
|
|
2207
|
+
readonly writer: REPLWriter;
|
|
2208
|
+
/**
|
|
2209
|
+
* Specified in the REPL options, this is the function to use for custom Tab auto-completion.
|
|
2210
|
+
*/
|
|
2211
|
+
readonly completer: Completer | AsyncCompleter;
|
|
2212
|
+
/**
|
|
2213
|
+
* Specified in the REPL options, this is a flag that specifies whether the default `eval`
|
|
2214
|
+
* function should execute all JavaScript commands in strict mode or default (sloppy) mode.
|
|
2215
|
+
* Possible values are:
|
|
2216
|
+
* - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
|
|
2217
|
+
* - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
|
|
2218
|
+
* prefacing every repl statement with `'use strict'`.
|
|
2219
|
+
*/
|
|
2220
|
+
readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* NOTE: According to the documentation:
|
|
2224
|
+
*
|
|
2225
|
+
* > Instances of `repl.REPLServer` are created using the `repl.start()` method and
|
|
2226
|
+
* > _should not_ be created directly using the JavaScript `new` keyword.
|
|
2227
|
+
*
|
|
2228
|
+
* `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
|
|
2229
|
+
*
|
|
2230
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
|
|
2231
|
+
*/
|
|
2232
|
+
private constructor();
|
|
2082
2233
|
|
|
2083
2234
|
/**
|
|
2084
2235
|
* Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked
|
|
2085
2236
|
* by typing a `.` followed by the `keyword`.
|
|
2237
|
+
*
|
|
2086
2238
|
* @param keyword The command keyword (_without_ a leading `.` character).
|
|
2087
2239
|
* @param cmd The function to invoke when the command is processed.
|
|
2240
|
+
*
|
|
2241
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd
|
|
2088
2242
|
*/
|
|
2089
|
-
defineCommand(keyword: string, cmd:
|
|
2243
|
+
defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
|
|
2090
2244
|
/**
|
|
2091
2245
|
* Readies the REPL instance for input from the user, printing the configured `prompt` to a
|
|
2092
2246
|
* new line in the `output` and resuming the `input` to accept new input.
|
|
@@ -2111,37 +2265,108 @@ declare module "repl" {
|
|
|
2111
2265
|
|
|
2112
2266
|
/**
|
|
2113
2267
|
* events.EventEmitter
|
|
2114
|
-
* 1.
|
|
2115
|
-
* 2.
|
|
2268
|
+
* 1. close - inherited from `readline.Interface`
|
|
2269
|
+
* 2. line - inherited from `readline.Interface`
|
|
2270
|
+
* 3. pause - inherited from `readline.Interface`
|
|
2271
|
+
* 4. resume - inherited from `readline.Interface`
|
|
2272
|
+
* 5. SIGCONT - inherited from `readline.Interface`
|
|
2273
|
+
* 6. SIGINT - inherited from `readline.Interface`
|
|
2274
|
+
* 7. SIGTSTP - inherited from `readline.Interface`
|
|
2275
|
+
* 8. exit
|
|
2276
|
+
* 9. reset
|
|
2116
2277
|
*/
|
|
2117
2278
|
|
|
2118
2279
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
2280
|
+
addListener(event: "close", listener: () => void): this;
|
|
2281
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
|
2282
|
+
addListener(event: "pause", listener: () => void): this;
|
|
2283
|
+
addListener(event: "resume", listener: () => void): this;
|
|
2284
|
+
addListener(event: "SIGCONT", listener: () => void): this;
|
|
2285
|
+
addListener(event: "SIGINT", listener: () => void): this;
|
|
2286
|
+
addListener(event: "SIGTSTP", listener: () => void): this;
|
|
2119
2287
|
addListener(event: "exit", listener: () => void): this;
|
|
2120
2288
|
addListener(event: "reset", listener: (context: Context) => void): this;
|
|
2121
2289
|
|
|
2122
2290
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
2291
|
+
emit(event: "close"): boolean;
|
|
2292
|
+
emit(event: "line", input: string): boolean;
|
|
2293
|
+
emit(event: "pause"): boolean;
|
|
2294
|
+
emit(event: "resume"): boolean;
|
|
2295
|
+
emit(event: "SIGCONT"): boolean;
|
|
2296
|
+
emit(event: "SIGINT"): boolean;
|
|
2297
|
+
emit(event: "SIGTSTP"): boolean;
|
|
2123
2298
|
emit(event: "exit"): boolean;
|
|
2124
2299
|
emit(event: "reset", context: Context): boolean;
|
|
2125
2300
|
|
|
2126
2301
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
2302
|
+
on(event: "close", listener: () => void): this;
|
|
2303
|
+
on(event: "line", listener: (input: string) => void): this;
|
|
2304
|
+
on(event: "pause", listener: () => void): this;
|
|
2305
|
+
on(event: "resume", listener: () => void): this;
|
|
2306
|
+
on(event: "SIGCONT", listener: () => void): this;
|
|
2307
|
+
on(event: "SIGINT", listener: () => void): this;
|
|
2308
|
+
on(event: "SIGTSTP", listener: () => void): this;
|
|
2127
2309
|
on(event: "exit", listener: () => void): this;
|
|
2128
2310
|
on(event: "reset", listener: (context: Context) => void): this;
|
|
2129
2311
|
|
|
2130
2312
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
2313
|
+
once(event: "close", listener: () => void): this;
|
|
2314
|
+
once(event: "line", listener: (input: string) => void): this;
|
|
2315
|
+
once(event: "pause", listener: () => void): this;
|
|
2316
|
+
once(event: "resume", listener: () => void): this;
|
|
2317
|
+
once(event: "SIGCONT", listener: () => void): this;
|
|
2318
|
+
once(event: "SIGINT", listener: () => void): this;
|
|
2319
|
+
once(event: "SIGTSTP", listener: () => void): this;
|
|
2131
2320
|
once(event: "exit", listener: () => void): this;
|
|
2132
2321
|
once(event: "reset", listener: (context: Context) => void): this;
|
|
2133
2322
|
|
|
2134
2323
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
2324
|
+
prependListener(event: "close", listener: () => void): this;
|
|
2325
|
+
prependListener(event: "line", listener: (input: string) => void): this;
|
|
2326
|
+
prependListener(event: "pause", listener: () => void): this;
|
|
2327
|
+
prependListener(event: "resume", listener: () => void): this;
|
|
2328
|
+
prependListener(event: "SIGCONT", listener: () => void): this;
|
|
2329
|
+
prependListener(event: "SIGINT", listener: () => void): this;
|
|
2330
|
+
prependListener(event: "SIGTSTP", listener: () => void): this;
|
|
2135
2331
|
prependListener(event: "exit", listener: () => void): this;
|
|
2136
2332
|
prependListener(event: "reset", listener: (context: Context) => void): this;
|
|
2137
2333
|
|
|
2138
2334
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
2335
|
+
prependOnceListener(event: "close", listener: () => void): this;
|
|
2336
|
+
prependOnceListener(event: "line", listener: (input: string) => void): this;
|
|
2337
|
+
prependOnceListener(event: "pause", listener: () => void): this;
|
|
2338
|
+
prependOnceListener(event: "resume", listener: () => void): this;
|
|
2339
|
+
prependOnceListener(event: "SIGCONT", listener: () => void): this;
|
|
2340
|
+
prependOnceListener(event: "SIGINT", listener: () => void): this;
|
|
2341
|
+
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
|
2139
2342
|
prependOnceListener(event: "exit", listener: () => void): this;
|
|
2140
2343
|
prependOnceListener(event: "reset", listener: (context: Context) => void): this;
|
|
2141
2344
|
}
|
|
2142
2345
|
|
|
2346
|
+
/**
|
|
2347
|
+
* A flag passed in the REPL options. Evaluates expressions in sloppy mode.
|
|
2348
|
+
*/
|
|
2349
|
+
export const REPL_MODE_SLOPPY: symbol; // TODO: unique symbol
|
|
2350
|
+
|
|
2351
|
+
/**
|
|
2352
|
+
* A flag passed in the REPL options. Evaluates expressions in strict mode.
|
|
2353
|
+
* This is equivalent to prefacing every repl statement with `'use strict'`.
|
|
2354
|
+
*/
|
|
2355
|
+
export const REPL_MODE_STRICT: symbol; // TODO: unique symbol
|
|
2356
|
+
|
|
2357
|
+
/**
|
|
2358
|
+
* Creates and starts a `repl.REPLServer` instance.
|
|
2359
|
+
*
|
|
2360
|
+
* @param options The options for the `REPLServer`. If `options` is a string, then it specifies
|
|
2361
|
+
* the input prompt.
|
|
2362
|
+
*/
|
|
2143
2363
|
function start(options?: string | ReplOptions): REPLServer;
|
|
2144
2364
|
|
|
2365
|
+
/**
|
|
2366
|
+
* Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
|
|
2367
|
+
*
|
|
2368
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
|
|
2369
|
+
*/
|
|
2145
2370
|
class Recoverable extends SyntaxError {
|
|
2146
2371
|
err: Error;
|
|
2147
2372
|
|
|
@@ -2161,12 +2386,33 @@ declare module "readline" {
|
|
|
2161
2386
|
shift?: boolean;
|
|
2162
2387
|
}
|
|
2163
2388
|
|
|
2164
|
-
|
|
2389
|
+
class Interface extends events.EventEmitter {
|
|
2390
|
+
readonly terminal: boolean;
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* NOTE: According to the documentation:
|
|
2394
|
+
*
|
|
2395
|
+
* > Instances of the `readline.Interface` class are constructed using the
|
|
2396
|
+
* > `readline.createInterface()` method.
|
|
2397
|
+
*
|
|
2398
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
|
|
2399
|
+
*/
|
|
2400
|
+
protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
|
|
2401
|
+
/**
|
|
2402
|
+
* NOTE: According to the documentation:
|
|
2403
|
+
*
|
|
2404
|
+
* > Instances of the `readline.Interface` class are constructed using the
|
|
2405
|
+
* > `readline.createInterface()` method.
|
|
2406
|
+
*
|
|
2407
|
+
* @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
|
|
2408
|
+
*/
|
|
2409
|
+
protected constructor(options: ReadLineOptions);
|
|
2410
|
+
|
|
2165
2411
|
setPrompt(prompt: string): void;
|
|
2166
2412
|
prompt(preserveCursor?: boolean): void;
|
|
2167
2413
|
question(query: string, callback: (answer: string) => void): void;
|
|
2168
|
-
pause():
|
|
2169
|
-
resume():
|
|
2414
|
+
pause(): this;
|
|
2415
|
+
resume(): this;
|
|
2170
2416
|
close(): void;
|
|
2171
2417
|
write(data: string | Buffer, key?: Key): void;
|
|
2172
2418
|
|
|
@@ -2183,7 +2429,7 @@ declare module "readline" {
|
|
|
2183
2429
|
|
|
2184
2430
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
2185
2431
|
addListener(event: "close", listener: () => void): this;
|
|
2186
|
-
addListener(event: "line", listener: (input:
|
|
2432
|
+
addListener(event: "line", listener: (input: string) => void): this;
|
|
2187
2433
|
addListener(event: "pause", listener: () => void): this;
|
|
2188
2434
|
addListener(event: "resume", listener: () => void): this;
|
|
2189
2435
|
addListener(event: "SIGCONT", listener: () => void): this;
|
|
@@ -2192,7 +2438,7 @@ declare module "readline" {
|
|
|
2192
2438
|
|
|
2193
2439
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
2194
2440
|
emit(event: "close"): boolean;
|
|
2195
|
-
emit(event: "line", input:
|
|
2441
|
+
emit(event: "line", input: string): boolean;
|
|
2196
2442
|
emit(event: "pause"): boolean;
|
|
2197
2443
|
emit(event: "resume"): boolean;
|
|
2198
2444
|
emit(event: "SIGCONT"): boolean;
|
|
@@ -2201,7 +2447,7 @@ declare module "readline" {
|
|
|
2201
2447
|
|
|
2202
2448
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
2203
2449
|
on(event: "close", listener: () => void): this;
|
|
2204
|
-
on(event: "line", listener: (input:
|
|
2450
|
+
on(event: "line", listener: (input: string) => void): this;
|
|
2205
2451
|
on(event: "pause", listener: () => void): this;
|
|
2206
2452
|
on(event: "resume", listener: () => void): this;
|
|
2207
2453
|
on(event: "SIGCONT", listener: () => void): this;
|
|
@@ -2210,7 +2456,7 @@ declare module "readline" {
|
|
|
2210
2456
|
|
|
2211
2457
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
2212
2458
|
once(event: "close", listener: () => void): this;
|
|
2213
|
-
once(event: "line", listener: (input:
|
|
2459
|
+
once(event: "line", listener: (input: string) => void): this;
|
|
2214
2460
|
once(event: "pause", listener: () => void): this;
|
|
2215
2461
|
once(event: "resume", listener: () => void): this;
|
|
2216
2462
|
once(event: "SIGCONT", listener: () => void): this;
|
|
@@ -2219,7 +2465,7 @@ declare module "readline" {
|
|
|
2219
2465
|
|
|
2220
2466
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
2221
2467
|
prependListener(event: "close", listener: () => void): this;
|
|
2222
|
-
prependListener(event: "line", listener: (input:
|
|
2468
|
+
prependListener(event: "line", listener: (input: string) => void): this;
|
|
2223
2469
|
prependListener(event: "pause", listener: () => void): this;
|
|
2224
2470
|
prependListener(event: "resume", listener: () => void): this;
|
|
2225
2471
|
prependListener(event: "SIGCONT", listener: () => void): this;
|
|
@@ -2228,7 +2474,7 @@ declare module "readline" {
|
|
|
2228
2474
|
|
|
2229
2475
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
2230
2476
|
prependOnceListener(event: "close", listener: () => void): this;
|
|
2231
|
-
prependOnceListener(event: "line", listener: (input:
|
|
2477
|
+
prependOnceListener(event: "line", listener: (input: string) => void): this;
|
|
2232
2478
|
prependOnceListener(event: "pause", listener: () => void): this;
|
|
2233
2479
|
prependOnceListener(event: "resume", listener: () => void): this;
|
|
2234
2480
|
prependOnceListener(event: "SIGCONT", listener: () => void): this;
|
|
@@ -2236,6 +2482,8 @@ declare module "readline" {
|
|
|
2236
2482
|
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
|
2237
2483
|
}
|
|
2238
2484
|
|
|
2485
|
+
type ReadLine = Interface; // type forwarded for backwards compatiblity
|
|
2486
|
+
|
|
2239
2487
|
type Completer = (line: string) => CompleterResult;
|
|
2240
2488
|
type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any;
|
|
2241
2489
|
|
|
@@ -2252,18 +2500,20 @@ declare module "readline" {
|
|
|
2252
2500
|
removeHistoryDuplicates?: boolean;
|
|
2253
2501
|
}
|
|
2254
2502
|
|
|
2255
|
-
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean):
|
|
2256
|
-
function createInterface(options: ReadLineOptions):
|
|
2503
|
+
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
|
2504
|
+
function createInterface(options: ReadLineOptions): Interface;
|
|
2257
2505
|
|
|
2258
2506
|
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void;
|
|
2259
|
-
function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?:
|
|
2507
|
+
function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void;
|
|
2260
2508
|
function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void;
|
|
2261
2509
|
function clearLine(stream: NodeJS.WritableStream, dir: number): void;
|
|
2262
2510
|
function clearScreenDown(stream: NodeJS.WritableStream): void;
|
|
2263
2511
|
}
|
|
2264
2512
|
|
|
2265
2513
|
declare module "vm" {
|
|
2266
|
-
interface Context {
|
|
2514
|
+
interface Context {
|
|
2515
|
+
[key: string]: any;
|
|
2516
|
+
}
|
|
2267
2517
|
interface BaseOptions {
|
|
2268
2518
|
/**
|
|
2269
2519
|
* Specifies the filename used in stack traces produced by this script.
|
|
@@ -2417,6 +2667,7 @@ declare module "child_process" {
|
|
|
2417
2667
|
windowsHide?: boolean;
|
|
2418
2668
|
}
|
|
2419
2669
|
|
|
2670
|
+
function spawn(command: string, options?: SpawnOptions): ChildProcess;
|
|
2420
2671
|
function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptions): ChildProcess;
|
|
2421
2672
|
|
|
2422
2673
|
interface ExecOptions {
|
|
@@ -6019,6 +6270,13 @@ declare module "tls" {
|
|
|
6019
6270
|
* May be used to distinguish TLS sockets from regular ones.
|
|
6020
6271
|
*/
|
|
6021
6272
|
encrypted: boolean;
|
|
6273
|
+
|
|
6274
|
+
/**
|
|
6275
|
+
* String containing the selected ALPN protocol.
|
|
6276
|
+
* When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
|
|
6277
|
+
*/
|
|
6278
|
+
alpnProtocol?: string;
|
|
6279
|
+
|
|
6022
6280
|
/**
|
|
6023
6281
|
* Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
|
|
6024
6282
|
* @returns Returns an object representing the cipher name
|
|
@@ -8064,6 +8322,7 @@ declare module "http2" {
|
|
|
8064
8322
|
peerMaxConcurrentStreams?: number;
|
|
8065
8323
|
selectPadding?: (frameLen: number, maxFrameLen: number) => number;
|
|
8066
8324
|
settings?: Settings;
|
|
8325
|
+
createConnection?: (option: SessionOptions) => stream.Duplex;
|
|
8067
8326
|
}
|
|
8068
8327
|
|
|
8069
8328
|
export type ClientSessionOptions = SessionOptions;
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "10.12.
|
|
3
|
+
"version": "10.12.12",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -173,6 +173,6 @@
|
|
|
173
173
|
},
|
|
174
174
|
"scripts": {},
|
|
175
175
|
"dependencies": {},
|
|
176
|
-
"typesPublisherContentHash": "
|
|
176
|
+
"typesPublisherContentHash": "501bf412bb414de586893751f62f04194bb0b566fe9dc17a3eecd77e56908ecc",
|
|
177
177
|
"typeScriptVersion": "2.0"
|
|
178
178
|
}
|