@types/node 4.9.1 → 4.9.5

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.
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
node v4.9/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Installation
2
+ > `npm install --save @types/node`
3
+
4
+ # Summary
5
+ This package contains type definitions for Node.js (http://nodejs.org/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v4.
9
+
10
+ ### Additional Details
11
+ * Last updated: Fri, 16 Oct 2020 16:30:57 GMT
12
+ * Dependencies: none
13
+ * Global values: `Buffer`, `SlowBuffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
+
15
+ # Credits
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Sebastian Silbermann](https://github.com/eps1lon), and [Sander Koenders](https://github.com/Archcry).
@@ -111,7 +111,7 @@ declare var SlowBuffer: {
111
111
  prototype: Buffer;
112
112
  isBuffer(obj: any): boolean;
113
113
  byteLength(string: string, encoding?: string): number;
114
- concat(list: Buffer[], totalLength?: number): Buffer;
114
+ concat(list: ReadonlyArray<Buffer>, totalLength?: number): Buffer;
115
115
  };
116
116
 
117
117
 
@@ -178,7 +178,7 @@ declare var Buffer: {
178
178
  * Creates a new Buffer using the passed {data}
179
179
  * @param data data to create a new Buffer
180
180
  */
181
- from(data: any[] | string | Buffer | ArrayBuffer /*| TypedArray*/): Buffer;
181
+ from(data: ReadonlyArray<any> | string | Buffer | ArrayBuffer /*| TypedArray*/): Buffer;
182
182
  /**
183
183
  * Creates a new Buffer containing the given JavaScript string {str}.
184
184
  * If provided, the {encoding} parameter identifies the character encoding.
@@ -217,7 +217,7 @@ declare var Buffer: {
217
217
  * @param totalLength Total length of the buffers when concatenated.
218
218
  * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
219
219
  */
220
- concat(list: Buffer[], totalLength?: number): Buffer;
220
+ concat(list: ReadonlyArray<Buffer>, totalLength?: number): Buffer;
221
221
  /**
222
222
  * The same as buf1.compare(buf2).
223
223
  */
@@ -389,6 +389,7 @@ declare namespace NodeJS {
389
389
  remove(emitter: Events): void;
390
390
  bind(cb: (err: Error, data: any) => any): any;
391
391
  intercept(cb: (data: any) => any): any;
392
+ /** @deprecated since v0.11.7 - recover from failed I/O actions explicitly via error event handlers set on the domain instead. */
392
393
  dispose(): void;
393
394
 
394
395
  addListener(event: string, listener: Function): this;
@@ -479,7 +480,7 @@ declare namespace NodeJS {
479
480
  nextTick(callback: Function): void;
480
481
  umask(mask?: number): number;
481
482
  uptime(): number;
482
- hrtime(time?:number[]): number[];
483
+ hrtime(time?:ReadonlyArray<number>): number[];
483
484
  domain: Domain;
484
485
 
485
486
  // Worker
@@ -672,14 +673,14 @@ declare module "http" {
672
673
  // incoming headers will never contain number
673
674
  export interface IncomingHttpHeaders {
674
675
  'accept'?: string;
675
- 'access-control-allow-origin'?: string;
676
+ 'accept-patch'?: string;
677
+ 'accept-ranges'?: string;
676
678
  'access-control-allow-credentials'?: string;
679
+ 'access-control-allow-headers'?: string;
680
+ 'access-control-allow-methods'?: string;
681
+ 'access-control-allow-origin'?: string;
677
682
  'access-control-expose-headers'?: string;
678
683
  'access-control-max-age'?: string;
679
- 'access-control-allow-methods'?: string;
680
- 'access-control-allow-headers'?: string;
681
- 'accept-patch'?: string;
682
- 'accept-ranges'?: string;
683
684
  'age'?: string;
684
685
  'allow'?: string;
685
686
  'alt-svc'?: string;
@@ -703,9 +704,9 @@ declare module "http" {
703
704
  'retry-after'?: string;
704
705
  'set-cookie'?: string[];
705
706
  'strict-transport-security'?: string;
707
+ 'tk'?: string;
706
708
  'trailer'?: string;
707
709
  'transfer-encoding'?: string;
708
- 'tk'?: string;
709
710
  'upgrade'?: string;
710
711
  'user-agent'?: string;
711
712
  'vary'?: string;
@@ -763,7 +764,7 @@ declare module "http" {
763
764
  statusCode: number;
764
765
  statusMessage: string;
765
766
  headersSent: boolean;
766
- setHeader(name: string, value: string | string[]): void;
767
+ setHeader(name: string, value: string | ReadonlyArray<string>): void;
767
768
  sendDate: boolean;
768
769
  getHeader(name: string): string;
769
770
  removeHeader(name: string): void;
@@ -785,13 +786,14 @@ declare module "http" {
785
786
  write(str: string, encoding?: string, cb?: Function): boolean;
786
787
  write(str: string, encoding?: string, fd?: string): boolean;
787
788
 
789
+ readonly path: string;
788
790
  write(chunk: any, encoding?: string): void;
789
791
  abort(): void;
790
792
  setTimeout(timeout: number, callback?: Function): void;
791
793
  setNoDelay(noDelay?: boolean): void;
792
794
  setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
793
795
 
794
- setHeader(name: string, value: string | string[]): void;
796
+ setHeader(name: string, value: string | ReadonlyArray<string>): void;
795
797
  getHeader(name: string): string;
796
798
  removeHeader(name: string): void;
797
799
  addTrailers(headers: OutgoingHttpHeaders): void;
@@ -1120,7 +1122,7 @@ declare module "punycode" {
1120
1122
  export var ucs2: ucs2;
1121
1123
  interface ucs2 {
1122
1124
  decode(string: string): number[];
1123
- encode(codePoints: number[]): string;
1125
+ encode(codePoints: ReadonlyArray<number>): string;
1124
1126
  }
1125
1127
  export var version: any;
1126
1128
  }
@@ -1298,11 +1300,11 @@ declare module "child_process" {
1298
1300
  // usage. child_process.execFile("file.sh", {encoding: null as string}, (err, stdout, stderr) => {});
1299
1301
  export function execFile(file: string, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
1300
1302
  export function execFile(file: string, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1301
- export function execFile(file: string, args?: string[], callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1302
- export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1303
+ export function execFile(file: string, args?: ReadonlyArray<string>, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1304
+ export function execFile(file: string, args?: ReadonlyArray<string>, options?: ExecFileOptionsWithStringEncoding, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1303
1305
  // usage. child_process.execFile("file.sh", ["foo"], {encoding: null as string}, (err, stdout, stderr) => {});
1304
- export function execFile(file: string, args?: string[], options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
1305
- export function execFile(file: string, args?: string[], options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1306
+ export function execFile(file: string, args?: ReadonlyArray<string>, options?: ExecFileOptionsWithBufferEncoding, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
1307
+ export function execFile(file: string, args?: ReadonlyArray<string>, options?: ExecFileOptions, callback?: (error: Error, stdout: string, stderr: string) =>void ): ChildProcess;
1306
1308
 
1307
1309
  export interface ForkOptions {
1308
1310
  cwd?: string;
@@ -1313,7 +1315,7 @@ declare module "child_process" {
1313
1315
  uid?: number;
1314
1316
  gid?: number;
1315
1317
  }
1316
- export function fork(modulePath: string, args?: string[], options?: ForkOptions): ChildProcess;
1318
+ export function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
1317
1319
 
1318
1320
  export interface SpawnSyncOptions {
1319
1321
  cwd?: string;
@@ -1347,9 +1349,9 @@ declare module "child_process" {
1347
1349
  export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1348
1350
  export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1349
1351
  export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1350
- export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1351
- export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1352
- export function spawnSync(command: string, args?: string[], options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1352
+ export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1353
+ export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1354
+ export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1353
1355
 
1354
1356
  export interface ExecSyncOptions {
1355
1357
  cwd?: string;
@@ -1397,9 +1399,9 @@ declare module "child_process" {
1397
1399
  export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
1398
1400
  export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1399
1401
  export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
1400
- export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
1401
- export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1402
- export function execFileSync(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer;
1402
+ export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
1403
+ export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1404
+ export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
1403
1405
  }
1404
1406
 
1405
1407
  declare module "url" {
@@ -1515,7 +1517,7 @@ declare module "dns" {
1515
1517
  export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
1516
1518
 
1517
1519
  export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
1518
- export function setServers(servers: string[]): void;
1520
+ export function setServers(servers: ReadonlyArray<string>): void;
1519
1521
 
1520
1522
  //Error codes
1521
1523
  export var NODATA: string;
@@ -2262,7 +2264,9 @@ declare module "crypto" {
2262
2264
  crl: string | string[];
2263
2265
  ciphers: string;
2264
2266
  }
2267
+ /** @deprecated since v0.11.13 - use tls.SecureContext instead. */
2265
2268
  export interface Credentials { context?: any; }
2269
+ /** @deprecated since v0.11.13 - use tls.createSecureContext instead. */
2266
2270
  export function createCredentials(details: CredentialDetails): Credentials;
2267
2271
  export function createHash(algorithm: string): Hash;
2268
2272
  export function createHmac(algorithm: string, key: string): Hmac;
@@ -2510,6 +2514,7 @@ declare module "domain" {
2510
2514
  remove(emitter: events.EventEmitter): void;
2511
2515
  bind(cb: (err: Error, data: any) => any): any;
2512
2516
  intercept(cb: (data: any) => any): any;
2517
+ /** @deprecated since v0.11.7 - recover from failed I/O actions explicitly via error event handlers set on the domain instead. */
2513
2518
  dispose(): void;
2514
2519
  }
2515
2520
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "4.9.1",
3
+ "version": "4.9.5",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -26,13 +26,14 @@
26
26
  }
27
27
  ],
28
28
  "main": "",
29
- "types": "",
29
+ "types": "index.d.ts",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
32
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
33
+ "directory": "types/node"
33
34
  },
34
35
  "scripts": {},
35
36
  "dependencies": {},
36
- "typesPublisherContentHash": "528c906111d26d107ef9bb01f5b6e6816f77bcb42769442588647ac8cc68aa10",
37
- "typeScriptVersion": "2.0"
37
+ "typesPublisherContentHash": "b1a16aa90acbbaf5f966d3b3d7bd879e9f76111f81d888ccd60543aa00999265",
38
+ "typeScriptVersion": "3.2"
38
39
  }
node v4/README.md DELETED
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/node`
3
-
4
- # Summary
5
- This package contains type definitions for Node.js (http://nodejs.org/).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v4
9
-
10
- Additional Details
11
- * Last updated: Thu, 01 Nov 2018 17:34:44 GMT
12
- * Dependencies: none
13
- * Global values: Buffer, SlowBuffer, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
14
-
15
- # Credits
16
- These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Sebastian Silbermann <https://github.com/eps1lon>, Sander Koenders <https://github.com/Archcry>.