@types/node 8.0.49 → 8.0.53

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.
Files changed (4) hide show
  1. node/README.md +2 -2
  2. node/index.d.ts +85 -26
  3. node/inspector.d.ts +9 -0
  4. node/package.json +12 -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/types/node
9
9
 
10
10
  Additional Details
11
- * Last updated: Mon, 06 Nov 2017 19:35:34 GMT
11
+ * Last updated: Wed, 15 Nov 2017 23:11:40 GMT
12
12
  * Dependencies: events, net, stream, url, child_process, tls, http, readline, dns, crypto, fs
13
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
- These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>.
16
+ These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Oliver Joseph Ash <https://github.com/OliverJAsh>, Sebastian Silbermann <https://github.com/eps1lon>.
node/index.d.ts CHANGED
@@ -13,6 +13,8 @@
13
13
  // Deividas Bakanas <https://github.com/DeividasBakanas>
14
14
  // Kelvin Jin <https://github.com/kjin>
15
15
  // Alvis HT Tang <https://github.com/alvis>
16
+ // Oliver Joseph Ash <https://github.com/OliverJAsh>
17
+ // Sebastian Silbermann <https://github.com/eps1lon>
16
18
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
17
19
 
18
20
  /************************************************
@@ -192,8 +194,6 @@ declare var Buffer: {
192
194
  prototype: Buffer;
193
195
  /**
194
196
  * Allocates a new Buffer using an {array} of octets.
195
- *
196
- * @param array
197
197
  */
198
198
  from(array: any[]): Buffer;
199
199
  /**
@@ -203,22 +203,16 @@ declare var Buffer: {
203
203
  * within the {arrayBuffer} that will be shared by the Buffer.
204
204
  *
205
205
  * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
206
- * @param byteOffset
207
- * @param length
208
206
  */
209
207
  from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
210
208
  /**
211
209
  * Copies the passed {buffer} data onto a new Buffer instance.
212
- *
213
- * @param buffer
214
210
  */
215
211
  from(buffer: Buffer): Buffer;
216
212
  /**
217
213
  * Creates a new Buffer containing the given JavaScript string {str}.
218
214
  * If provided, the {encoding} parameter identifies the character encoding.
219
215
  * If not provided, {encoding} defaults to 'utf8'.
220
- *
221
- * @param str
222
216
  */
223
217
  from(str: string, encoding?: string): Buffer;
224
218
  /**
@@ -471,11 +465,15 @@ declare namespace NodeJS {
471
465
  exit(code?: number): never;
472
466
  exitCode: number;
473
467
  getgid(): number;
474
- setgid(id: number): void;
475
- setgid(id: string): void;
468
+ setgid(id: number | string): void;
476
469
  getuid(): number;
477
- setuid(id: number): void;
478
- setuid(id: string): void;
470
+ setuid(id: number | string): void;
471
+ geteuid(): number;
472
+ seteuid(id: number | string): void;
473
+ getegid(): number;
474
+ setegid(id: number | string): void;
475
+ getgroups(): number[];
476
+ setgroups(groups: Array<string | number>): void;
479
477
  version: string;
480
478
  versions: ProcessVersions;
481
479
  config: {
@@ -837,7 +835,47 @@ declare module "http" {
837
835
 
838
836
  // incoming headers will never contain number
839
837
  export interface IncomingHttpHeaders {
840
- [header: string]: string | string[];
838
+ 'accept'?: string;
839
+ 'access-control-allow-origin'?: string;
840
+ 'access-control-allow-credentials'?: string;
841
+ 'access-control-expose-headers'?: string;
842
+ 'access-control-max-age'?: string;
843
+ 'access-control-allow-methods'?: string;
844
+ 'access-control-allow-headers'?: string;
845
+ 'accept-patch'?: string;
846
+ 'accept-ranges'?: string;
847
+ 'age'?: string;
848
+ 'allow'?: string;
849
+ 'alt-svc'?: string;
850
+ 'cache-control'?: string;
851
+ 'connection'?: string;
852
+ 'content-disposition'?: string;
853
+ 'content-encoding'?: string;
854
+ 'content-language'?: string;
855
+ 'content-length'?: string;
856
+ 'content-location'?: string;
857
+ 'content-range'?: string;
858
+ 'content-type'?: string;
859
+ 'date'?: string;
860
+ 'expires'?: string;
861
+ 'host'?: string;
862
+ 'last-modified'?: string;
863
+ 'location'?: string;
864
+ 'pragma'?: string;
865
+ 'proxy-authenticate'?: string;
866
+ 'public-key-pins'?: string;
867
+ 'retry-after'?: string;
868
+ 'set-cookie'?: string[];
869
+ 'strict-transport-security'?: string;
870
+ 'trailer'?: string;
871
+ 'transfer-encoding'?: string;
872
+ 'tk'?: string;
873
+ 'upgrade'?: string;
874
+ 'vary'?: string;
875
+ 'via'?: string;
876
+ 'warning'?: string;
877
+ 'www-authenticate'?: string;
878
+ [header: string]: string | string[] | undefined;
841
879
  }
842
880
 
843
881
  // outgoing headers allows numbers (as they are converted internally to strings)
@@ -4313,6 +4351,7 @@ declare module "fs" {
4313
4351
  autoClose?: boolean;
4314
4352
  start?: number;
4315
4353
  end?: number;
4354
+ highWaterMark?: number;
4316
4355
  }): ReadStream;
4317
4356
 
4318
4357
  /**
@@ -4426,6 +4465,29 @@ declare module "path" {
4426
4465
  name: string;
4427
4466
  }
4428
4467
 
4468
+ export interface FormatInputPathObject {
4469
+ /**
4470
+ * The root of the path such as '/' or 'c:\'
4471
+ */
4472
+ root?: string;
4473
+ /**
4474
+ * The full directory path such as '/home/user/dir' or 'c:\path\dir'
4475
+ */
4476
+ dir?: string;
4477
+ /**
4478
+ * The file name including extension (if any) such as 'index.html'
4479
+ */
4480
+ base?: string;
4481
+ /**
4482
+ * The file extension (if any) such as '.html'
4483
+ */
4484
+ ext?: string;
4485
+ /**
4486
+ * The file name without extension (if any) such as 'index'
4487
+ */
4488
+ name?: string;
4489
+ }
4490
+
4429
4491
  /**
4430
4492
  * Normalize a string path, reducing '..' and '.' parts.
4431
4493
  * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
@@ -4459,9 +4521,6 @@ declare module "path" {
4459
4521
  /**
4460
4522
  * Solve the relative path from {from} to {to}.
4461
4523
  * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
4462
- *
4463
- * @param from
4464
- * @param to
4465
4524
  */
4466
4525
  export function relative(from: string, to: string): string;
4467
4526
  /**
@@ -4504,7 +4563,7 @@ declare module "path" {
4504
4563
  *
4505
4564
  * @param pathString path to evaluate.
4506
4565
  */
4507
- export function format(pathObject: ParsedPath): string;
4566
+ export function format(pathObject: FormatInputPathObject): string;
4508
4567
 
4509
4568
  export module posix {
4510
4569
  export function normalize(p: string): string;
@@ -4694,7 +4753,7 @@ declare module "tls" {
4694
4753
  encrypted: boolean;
4695
4754
  /**
4696
4755
  * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
4697
- * @returns {CipherNameAndProtocol} - Returns an object representing the cipher name
4756
+ * @returns Returns an object representing the cipher name
4698
4757
  * and the SSL/TLS protocol version of the current connection.
4699
4758
  */
4700
4759
  getCipher(): CipherNameAndProtocol;
@@ -4704,21 +4763,21 @@ declare module "tls" {
4704
4763
  * If detailed argument is true the full chain with issuer property will be returned,
4705
4764
  * if false only the top certificate without issuer property.
4706
4765
  * If the peer does not provide a certificate, it returns null or an empty object.
4707
- * @param {boolean} detailed - If true; the full chain with issuer property will be returned.
4708
- * @returns {PeerCertificate | DetailedPeerCertificate} - An object representing the peer's certificate.
4766
+ * @param detailed - If true; the full chain with issuer property will be returned.
4767
+ * @returns An object representing the peer's certificate.
4709
4768
  */
4710
4769
  getPeerCertificate(detailed: true): DetailedPeerCertificate;
4711
4770
  getPeerCertificate(detailed?: false): PeerCertificate;
4712
4771
  getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
4713
4772
  /**
4714
4773
  * Could be used to speed up handshake establishment when reconnecting to the server.
4715
- * @returns {any} - ASN.1 encoded TLS session or undefined if none was negotiated.
4774
+ * @returns ASN.1 encoded TLS session or undefined if none was negotiated.
4716
4775
  */
4717
4776
  getSession(): any;
4718
4777
  /**
4719
4778
  * NOTE: Works only with client TLS sockets.
4720
4779
  * Useful only for debugging, for session reuse provide session option to tls.connect().
4721
- * @returns {any} - TLS session ticket or undefined if none was negotiated.
4780
+ * @returns TLS session ticket or undefined if none was negotiated.
4722
4781
  */
4723
4782
  getTLSTicket(): any;
4724
4783
  /**
@@ -4726,9 +4785,9 @@ declare module "tls" {
4726
4785
  *
4727
4786
  * NOTE: Can be used to request peer's certificate after the secure connection has been established.
4728
4787
  * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.
4729
- * @param {TlsOptions} options - The options may contain the following fields: rejectUnauthorized,
4788
+ * @param options - The options may contain the following fields: rejectUnauthorized,
4730
4789
  * requestCert (See tls.createServer() for details).
4731
- * @param {Function} callback - callback(err) will be executed with null as err, once the renegotiation
4790
+ * @param callback - callback(err) will be executed with null as err, once the renegotiation
4732
4791
  * is successfully completed.
4733
4792
  */
4734
4793
  renegotiate(options: TlsOptions, callback: (err: Error | null) => void): any;
@@ -4739,8 +4798,8 @@ declare module "tls" {
4739
4798
  * large fragments can span multiple roundtrips, and their processing can be delayed due to packet
4740
4799
  * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead,
4741
4800
  * which may decrease overall server throughput.
4742
- * @param {number} size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
4743
- * @returns {boolean} - Returns true on success, false otherwise.
4801
+ * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
4802
+ * @returns Returns true on success, false otherwise.
4744
4803
  */
4745
4804
  setMaxSendFragment(size: number): boolean;
4746
4805
 
node/inspector.d.ts CHANGED
@@ -690,6 +690,11 @@ declare module "inspector" {
690
690
  * Stack trace captured when the call was made.
691
691
  */
692
692
  stackTrace?: Runtime.StackTrace;
693
+ /**
694
+ * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
695
+ * @experimental
696
+ */
697
+ context?: string;
693
698
  }
694
699
 
695
700
  export interface InspectRequestedEventDataType {
@@ -1434,6 +1439,10 @@ declare module "inspector" {
1434
1439
  * Source ranges inside the function with coverage data.
1435
1440
  */
1436
1441
  ranges: Profiler.CoverageRange[];
1442
+ /**
1443
+ * Whether coverage data for this function has block granularity.
1444
+ */
1445
+ isBlockCoverage: boolean;
1437
1446
  }
1438
1447
 
1439
1448
  /**
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "8.0.49",
3
+ "version": "8.0.53",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -66,6 +66,16 @@
66
66
  "name": "Alvis HT Tang",
67
67
  "url": "https://github.com/alvis",
68
68
  "githubUsername": "alvis"
69
+ },
70
+ {
71
+ "name": "Oliver Joseph Ash",
72
+ "url": "https://github.com/OliverJAsh",
73
+ "githubUsername": "OliverJAsh"
74
+ },
75
+ {
76
+ "name": "Sebastian Silbermann",
77
+ "url": "https://github.com/eps1lon",
78
+ "githubUsername": "eps1lon"
69
79
  }
70
80
  ],
71
81
  "main": "",
@@ -75,6 +85,6 @@
75
85
  },
76
86
  "scripts": {},
77
87
  "dependencies": {},
78
- "typesPublisherContentHash": "e570fba8726cbdb1db15f082653d11b2255b3e52e8d0280d9292695c08358ccb",
88
+ "typesPublisherContentHash": "7628c177ed2033fe9d4dfbbef0851ddb49397afbd2e4cd6f04aea9b9b4f1996f",
79
89
  "typeScriptVersion": "2.0"
80
90
  }