@types/node 13.5.1 → 13.7.1

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 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: Tue, 28 Jan 2020 19:35:03 GMT
11
+ * Last updated: Tue, 11 Feb 2020 17:16:28 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node/globals.d.ts CHANGED
@@ -239,6 +239,12 @@ declare class Buffer extends Uint8Array {
239
239
  */
240
240
  static from(data: number[]): Buffer;
241
241
  static from(data: Uint8Array): Buffer;
242
+ /**
243
+ * Creates a new buffer containing the coerced value of an object
244
+ * A `TypeError` will be thrown if {obj} has not mentioned methods or is not of other type appropriate for `Buffer.from()` variants.
245
+ * @param obj An object supporting `Symbol.toPrimitive` or `valueOf()`.
246
+ */
247
+ static from(obj: { valueOf(): string | object } | { [Symbol.toPrimitive](hint: 'string'): string }, byteOffset?: number, length?: number): Buffer;
242
248
  /**
243
249
  * Creates a new Buffer containing the given JavaScript string {str}.
244
250
  * If provided, the {encoding} parameter identifies the character encoding.
node/http2.d.ts CHANGED
@@ -440,6 +440,7 @@ declare module "http2" {
440
440
  export interface ClientSessionOptions extends SessionOptions {
441
441
  maxReservedRemoteStreams?: number;
442
442
  createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
443
+ protocol?: 'http:' | 'https:';
443
444
  }
444
445
 
445
446
  export interface ServerSessionOptions extends SessionOptions {
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 13.5
1
+ // Type definitions for non-npm package Node.js 13.7
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
node/module.d.ts CHANGED
@@ -1,6 +1,43 @@
1
1
  declare module "module" {
2
2
  import { URL } from "url";
3
- namespace Module {}
3
+ namespace Module {
4
+ /**
5
+ * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
6
+ * It does not add or remove exported names from the ES Modules.
7
+ */
8
+ function syncBuiltinESMExports(): void;
9
+
10
+ /**
11
+ * @experimental
12
+ */
13
+ function findSourceMap(path: string, error?: Error): SourceMap;
14
+ interface SourceMapPayload {
15
+ file: string;
16
+ version: number;
17
+ sources: string[];
18
+ sourcesContent: string[];
19
+ names: string[];
20
+ mappings: string;
21
+ sourceRoot: string;
22
+ }
23
+
24
+ interface SourceMapping {
25
+ generatedLine: number;
26
+ generatedColumn: number;
27
+ originalSource: string;
28
+ originalLine: number;
29
+ originalColumn: number;
30
+ }
31
+
32
+ /**
33
+ * @experimental
34
+ */
35
+ class SourceMap {
36
+ readonly payload: SourceMapPayload;
37
+ constructor(payload: SourceMapPayload);
38
+ findEntry(line: number, column: number): SourceMapping;
39
+ }
40
+ }
4
41
  interface Module extends NodeModule {}
5
42
  class Module {
6
43
  static runMain(): void;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "13.5.1",
3
+ "version": "13.7.1",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -226,6 +226,6 @@
226
226
  },
227
227
  "scripts": {},
228
228
  "dependencies": {},
229
- "typesPublisherContentHash": "7314e60fb8bca25bad2aa6b8ea5d14ffd9895d2dd133148ef650af34e336a4ae",
229
+ "typesPublisherContentHash": "8b99aa0031fac941d520282519c47b0255109858a20251313b1210c28769f463",
230
230
  "typeScriptVersion": "2.8"
231
231
  }
node/stream.d.ts CHANGED
@@ -267,9 +267,15 @@ declare module "stream" {
267
267
 
268
268
  class PassThrough extends Transform { }
269
269
 
270
+ interface FinishedOptions {
271
+ error?: boolean;
272
+ readable?: boolean;
273
+ writable?: boolean;
274
+ }
275
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
270
276
  function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
271
277
  namespace finished {
272
- function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise<void>;
278
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
273
279
  }
274
280
 
275
281
  function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;