@types/node 7.0.8 → 7.0.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 +2 -2
- node/index.d.ts +31 -33
- node/package.json +2 -2
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 27 Mar 2017 23:00:22 GMT
|
|
12
12
|
* Dependencies: events, net, stream, child_process, tls, http, readline, crypto
|
|
13
|
-
* Global values: Buffer, NodeJS, SlowBuffer, Symbol,
|
|
13
|
+
* Global values: Buffer, NodeJS, SlowBuffer, Symbol, ___dirname, ___filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
16
|
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>.
|
node/index.d.ts
CHANGED
|
@@ -1209,7 +1209,7 @@ declare module "os" {
|
|
|
1209
1209
|
export function userInfo(options?: { encoding: string }): { username: string, uid: number, gid: number, shell: any, homedir: string }
|
|
1210
1210
|
export var constants: {
|
|
1211
1211
|
UV_UDP_REUSEADDR: number,
|
|
1212
|
-
|
|
1212
|
+
signals: {
|
|
1213
1213
|
SIGHUP: number;
|
|
1214
1214
|
SIGINT: number;
|
|
1215
1215
|
SIGQUIT: number;
|
|
@@ -1245,7 +1245,7 @@ declare module "os" {
|
|
|
1245
1245
|
SIGSYS: number;
|
|
1246
1246
|
SIGUNUSED: number;
|
|
1247
1247
|
},
|
|
1248
|
-
|
|
1248
|
+
errno: {
|
|
1249
1249
|
E2BIG: number;
|
|
1250
1250
|
EACCES: number;
|
|
1251
1251
|
EADDRINUSE: number;
|
|
@@ -1546,22 +1546,20 @@ declare module "readline" {
|
|
|
1546
1546
|
prependOnceListener(event: "SIGTSTP", listener: () => void): this;
|
|
1547
1547
|
}
|
|
1548
1548
|
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
(line: string, callback: (err: any, result: CompleterResult) => void): any;
|
|
1552
|
-
}
|
|
1549
|
+
type Completer = (line: string) => CompleterResult;
|
|
1550
|
+
type AsyncCompleter = (line: string, callback: (err: any, result: CompleterResult) => void) => any;
|
|
1553
1551
|
|
|
1554
1552
|
export type CompleterResult = [string[], string];
|
|
1555
1553
|
|
|
1556
1554
|
export interface ReadLineOptions {
|
|
1557
1555
|
input: NodeJS.ReadableStream;
|
|
1558
1556
|
output?: NodeJS.WritableStream;
|
|
1559
|
-
completer?: Completer;
|
|
1557
|
+
completer?: Completer | AsyncCompleter;
|
|
1560
1558
|
terminal?: boolean;
|
|
1561
1559
|
historySize?: number;
|
|
1562
1560
|
}
|
|
1563
1561
|
|
|
1564
|
-
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer, terminal?: boolean): ReadLine;
|
|
1562
|
+
export function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): ReadLine;
|
|
1565
1563
|
export function createInterface(options: ReadLineOptions): ReadLine;
|
|
1566
1564
|
|
|
1567
1565
|
export function cursorTo(stream: NodeJS.WritableStream, x: number, y: number): void;
|
|
@@ -1623,7 +1621,7 @@ declare module "child_process" {
|
|
|
1623
1621
|
/**
|
|
1624
1622
|
* events.EventEmitter
|
|
1625
1623
|
* 1. close
|
|
1626
|
-
* 2.
|
|
1624
|
+
* 2. disconnect
|
|
1627
1625
|
* 3. error
|
|
1628
1626
|
* 4. exit
|
|
1629
1627
|
* 5. message
|
|
@@ -1631,42 +1629,42 @@ declare module "child_process" {
|
|
|
1631
1629
|
|
|
1632
1630
|
addListener(event: string, listener: Function): this;
|
|
1633
1631
|
addListener(event: "close", listener: (code: number, signal: string) => void): this;
|
|
1634
|
-
addListener(event: "
|
|
1632
|
+
addListener(event: "disconnect", listener: () => void): this;
|
|
1635
1633
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
1636
1634
|
addListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
1637
1635
|
addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
1638
1636
|
|
|
1639
1637
|
emit(event: string, ...args: any[]): boolean;
|
|
1640
1638
|
emit(event: "close", code: number, signal: string): boolean;
|
|
1641
|
-
emit(event: "
|
|
1639
|
+
emit(event: "disconnect"): boolean;
|
|
1642
1640
|
emit(event: "error", err: Error): boolean;
|
|
1643
1641
|
emit(event: "exit", code: number, signal: string): boolean;
|
|
1644
1642
|
emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean;
|
|
1645
1643
|
|
|
1646
1644
|
on(event: string, listener: Function): this;
|
|
1647
1645
|
on(event: "close", listener: (code: number, signal: string) => void): this;
|
|
1648
|
-
on(event: "
|
|
1646
|
+
on(event: "disconnect", listener: () => void): this;
|
|
1649
1647
|
on(event: "error", listener: (err: Error) => void): this;
|
|
1650
1648
|
on(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
1651
1649
|
on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
1652
1650
|
|
|
1653
1651
|
once(event: string, listener: Function): this;
|
|
1654
1652
|
once(event: "close", listener: (code: number, signal: string) => void): this;
|
|
1655
|
-
once(event: "
|
|
1653
|
+
once(event: "disconnect", listener: () => void): this;
|
|
1656
1654
|
once(event: "error", listener: (err: Error) => void): this;
|
|
1657
1655
|
once(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
1658
1656
|
once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
1659
1657
|
|
|
1660
1658
|
prependListener(event: string, listener: Function): this;
|
|
1661
1659
|
prependListener(event: "close", listener: (code: number, signal: string) => void): this;
|
|
1662
|
-
prependListener(event: "
|
|
1660
|
+
prependListener(event: "disconnect", listener: () => void): this;
|
|
1663
1661
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
1664
1662
|
prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
1665
1663
|
prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
1666
1664
|
|
|
1667
1665
|
prependOnceListener(event: string, listener: Function): this;
|
|
1668
1666
|
prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this;
|
|
1669
|
-
prependOnceListener(event: "
|
|
1667
|
+
prependOnceListener(event: "disconnect", listener: () => void): this;
|
|
1670
1668
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
1671
1669
|
prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
|
|
1672
1670
|
prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
|
|
@@ -2396,40 +2394,40 @@ declare module "fs" {
|
|
|
2396
2394
|
export function realpath(path: string | Buffer, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
|
|
2397
2395
|
export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
|
|
2398
2396
|
export function realpathSync(path: string | Buffer, cache?: { [path: string]: string }): string;
|
|
2399
|
-
|
|
2397
|
+
/**
|
|
2400
2398
|
* Asynchronous unlink - deletes the file specified in {path}
|
|
2401
2399
|
*
|
|
2402
2400
|
* @param path
|
|
2403
2401
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2404
2402
|
*/
|
|
2405
2403
|
export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2406
|
-
|
|
2404
|
+
/**
|
|
2407
2405
|
* Synchronous unlink - deletes the file specified in {path}
|
|
2408
2406
|
*
|
|
2409
2407
|
* @param path
|
|
2410
2408
|
*/
|
|
2411
2409
|
export function unlinkSync(path: string | Buffer): void;
|
|
2412
|
-
|
|
2410
|
+
/**
|
|
2413
2411
|
* Asynchronous rmdir - removes the directory specified in {path}
|
|
2414
2412
|
*
|
|
2415
2413
|
* @param path
|
|
2416
2414
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2417
2415
|
*/
|
|
2418
2416
|
export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2419
|
-
|
|
2417
|
+
/**
|
|
2420
2418
|
* Synchronous rmdir - removes the directory specified in {path}
|
|
2421
2419
|
*
|
|
2422
2420
|
* @param path
|
|
2423
2421
|
*/
|
|
2424
2422
|
export function rmdirSync(path: string | Buffer): void;
|
|
2425
|
-
|
|
2423
|
+
/**
|
|
2426
2424
|
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2427
2425
|
*
|
|
2428
2426
|
* @param path
|
|
2429
2427
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2430
2428
|
*/
|
|
2431
2429
|
export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2432
|
-
|
|
2430
|
+
/**
|
|
2433
2431
|
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2434
2432
|
*
|
|
2435
2433
|
* @param path
|
|
@@ -2437,7 +2435,7 @@ declare module "fs" {
|
|
|
2437
2435
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2438
2436
|
*/
|
|
2439
2437
|
export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2440
|
-
|
|
2438
|
+
/**
|
|
2441
2439
|
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2442
2440
|
*
|
|
2443
2441
|
* @param path
|
|
@@ -2445,7 +2443,7 @@ declare module "fs" {
|
|
|
2445
2443
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2446
2444
|
*/
|
|
2447
2445
|
export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2448
|
-
|
|
2446
|
+
/**
|
|
2449
2447
|
* Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2450
2448
|
*
|
|
2451
2449
|
* @param path
|
|
@@ -2453,7 +2451,7 @@ declare module "fs" {
|
|
|
2453
2451
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2454
2452
|
*/
|
|
2455
2453
|
export function mkdirSync(path: string | Buffer, mode?: number): void;
|
|
2456
|
-
|
|
2454
|
+
/**
|
|
2457
2455
|
* Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2458
2456
|
*
|
|
2459
2457
|
* @param path
|
|
@@ -2461,14 +2459,14 @@ declare module "fs" {
|
|
|
2461
2459
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2462
2460
|
*/
|
|
2463
2461
|
export function mkdirSync(path: string | Buffer, mode?: string): void;
|
|
2464
|
-
|
|
2462
|
+
/**
|
|
2465
2463
|
* Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
2466
2464
|
*
|
|
2467
2465
|
* @param prefix
|
|
2468
2466
|
* @param callback The created folder path is passed as a string to the callback's second parameter.
|
|
2469
2467
|
*/
|
|
2470
2468
|
export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
2471
|
-
|
|
2469
|
+
/**
|
|
2472
2470
|
* Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
2473
2471
|
*
|
|
2474
2472
|
* @param prefix
|
|
@@ -2501,7 +2499,7 @@ declare module "fs" {
|
|
|
2501
2499
|
export function writeSync(fd: number, data: any, position?: number, enconding?: string): number;
|
|
2502
2500
|
export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
|
|
2503
2501
|
export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
|
|
2504
|
-
|
|
2502
|
+
/**
|
|
2505
2503
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2506
2504
|
*
|
|
2507
2505
|
* @param fileName
|
|
@@ -2509,7 +2507,7 @@ declare module "fs" {
|
|
|
2509
2507
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2510
2508
|
*/
|
|
2511
2509
|
export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
2512
|
-
|
|
2510
|
+
/**
|
|
2513
2511
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2514
2512
|
*
|
|
2515
2513
|
* @param fileName
|
|
@@ -2517,7 +2515,7 @@ declare module "fs" {
|
|
|
2517
2515
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2518
2516
|
*/
|
|
2519
2517
|
export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
2520
|
-
|
|
2518
|
+
/**
|
|
2521
2519
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2522
2520
|
*
|
|
2523
2521
|
* @param fileName
|
|
@@ -2525,28 +2523,28 @@ declare module "fs" {
|
|
|
2525
2523
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2526
2524
|
*/
|
|
2527
2525
|
export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
2528
|
-
|
|
2526
|
+
/**
|
|
2529
2527
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2530
2528
|
*
|
|
2531
2529
|
* @param fileName
|
|
2532
2530
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2533
2531
|
*/
|
|
2534
2532
|
export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
2535
|
-
|
|
2533
|
+
/**
|
|
2536
2534
|
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
|
2537
2535
|
*
|
|
2538
2536
|
* @param fileName
|
|
2539
2537
|
* @param encoding
|
|
2540
2538
|
*/
|
|
2541
2539
|
export function readFileSync(filename: string, encoding: string): string;
|
|
2542
|
-
|
|
2540
|
+
/**
|
|
2543
2541
|
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
|
2544
2542
|
*
|
|
2545
2543
|
* @param fileName
|
|
2546
2544
|
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
|
2547
2545
|
*/
|
|
2548
2546
|
export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
|
|
2549
|
-
|
|
2547
|
+
/**
|
|
2550
2548
|
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
|
2551
2549
|
*
|
|
2552
2550
|
* @param fileName
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.12",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"scripts": {},
|
|
22
22
|
"dependencies": {},
|
|
23
23
|
"peerDependencies": {},
|
|
24
|
-
"typesPublisherContentHash": "
|
|
24
|
+
"typesPublisherContentHash": "251443f97034d6b39b494fd0479f5c9dd24e695ca9312a3f96ce9b2d4ab09807",
|
|
25
25
|
"typeScriptVersion": "2.0"
|
|
26
26
|
}
|