@types/node 12.20.39 → 12.20.43

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 v12.20/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v12.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 26 Dec 2021 13:01:25 GMT
11
+ * Last updated: Tue, 01 Feb 2022 08:31:32 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
@@ -673,9 +673,9 @@ declare namespace NodeJS {
673
673
  writable: boolean;
674
674
  write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
675
675
  write(str: string, encoding?: string, cb?: (err?: Error | null) => void): boolean;
676
- end(cb?: () => void): void;
677
- end(data: string | Uint8Array, cb?: () => void): void;
678
- end(str: string, encoding?: string, cb?: () => void): void;
676
+ end(cb?: () => void): this;
677
+ end(data: string | Uint8Array, cb?: () => void): this;
678
+ end(str: string, encoding?: string, cb?: () => void): this;
679
679
  }
680
680
 
681
681
  interface ReadWriteStream extends ReadableStream, WritableStream { }
@@ -802,7 +802,7 @@ declare namespace NodeJS {
802
802
  /**
803
803
  * If true, a diagnostic report is generated when the process
804
804
  * receives the signal specified by process.report.signal.
805
- * @defaul false
805
+ * @default false
806
806
  */
807
807
  reportOnSignal: boolean;
808
808
 
node v12.20/http.d.ts CHANGED
@@ -247,6 +247,8 @@ declare module 'http' {
247
247
  aborted: boolean;
248
248
  host: string;
249
249
  protocol: string;
250
+ reusedSocket: boolean;
251
+ maxHeadersCount: number;
250
252
 
251
253
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
252
254
 
@@ -370,7 +372,7 @@ declare module 'http' {
370
372
  */
371
373
  statusMessage?: string | undefined;
372
374
  socket: Socket;
373
- destroy(error?: Error): void;
375
+ destroy(error?: Error): this;
374
376
  }
375
377
 
376
378
  interface AgentOptions {
node v12.20/http2.d.ts CHANGED
@@ -654,9 +654,9 @@ declare module 'http2' {
654
654
  statusCode: number;
655
655
  statusMessage: '';
656
656
  addTrailers(trailers: OutgoingHttpHeaders): void;
657
- end(callback?: () => void): void;
658
- end(data: string | Uint8Array, callback?: () => void): void;
659
- end(data: string | Uint8Array, encoding: string, callback?: () => void): void;
657
+ end(callback?: () => void): this;
658
+ end(data: string | Uint8Array, callback?: () => void): this;
659
+ end(data: string | Uint8Array, encoding: string, callback?: () => void): this;
660
660
  getHeader(name: string): string;
661
661
  getHeaderNames(): string[];
662
662
  getHeaders(): OutgoingHttpHeaders;
node v12.20/net.d.ts CHANGED
@@ -91,9 +91,9 @@ declare module 'net' {
91
91
  readonly remotePort?: number | undefined;
92
92
 
93
93
  // Extended base methods
94
- end(cb?: () => void): void;
95
- end(buffer: Uint8Array | string, cb?: () => void): void;
96
- end(str: Uint8Array | string, encoding?: string, cb?: () => void): void;
94
+ end(cb?: () => void): this;
95
+ end(buffer: Uint8Array | string, cb?: () => void): this;
96
+ end(str: Uint8Array | string, encoding?: string, cb?: () => void): this;
97
97
 
98
98
  /**
99
99
  * events.EventEmitter
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.20.39",
3
+ "version": "12.20.43",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -190,6 +190,6 @@
190
190
  },
191
191
  "scripts": {},
192
192
  "dependencies": {},
193
- "typesPublisherContentHash": "ba5c2128b03959ee028cc41d7ca7bfa7b9e850a72664e28521ce26d0a6736395",
193
+ "typesPublisherContentHash": "65840c8a980bb0fee8cb5a1fd1376e2c9859f6258e8936b87c4f57d16119945c",
194
194
  "typeScriptVersion": "3.8"
195
195
  }
node v12.20/stream.d.ts CHANGED
@@ -43,7 +43,7 @@ declare module 'stream' {
43
43
  wrap(oldStream: NodeJS.ReadableStream): this;
44
44
  push(chunk: any, encoding?: string): boolean;
45
45
  _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
46
- destroy(error?: Error): void;
46
+ destroy(error?: Error): this;
47
47
 
48
48
  /**
49
49
  * Event emitter
@@ -135,12 +135,12 @@ declare module 'stream' {
135
135
  write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
136
136
  write(chunk: any, encoding: string, cb?: (error: Error | null | undefined) => void): boolean;
137
137
  setDefaultEncoding(encoding: string): this;
138
- end(cb?: () => void): void;
139
- end(chunk: any, cb?: () => void): void;
140
- end(chunk: any, encoding: string, cb?: () => void): void;
138
+ end(cb?: () => void): this;
139
+ end(chunk: any, cb?: () => void): this;
140
+ end(chunk: any, encoding: string, cb?: () => void): this;
141
141
  cork(): void;
142
142
  uncork(): void;
143
- destroy(error?: Error): void;
143
+ destroy(error?: Error): this;
144
144
 
145
145
  /**
146
146
  * Event emitter
@@ -239,9 +239,9 @@ declare module 'stream' {
239
239
  write(chunk: any, encoding?: string, cb?: (error: Error | null | undefined) => void): boolean;
240
240
  write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
241
241
  setDefaultEncoding(encoding: string): this;
242
- end(cb?: () => void): void;
243
- end(chunk: any, cb?: () => void): void;
244
- end(chunk: any, encoding?: string, cb?: () => void): void;
242
+ end(cb?: () => void): this;
243
+ end(chunk: any, cb?: () => void): this;
244
+ end(chunk: any, encoding?: string, cb?: () => void): this;
245
245
  cork(): void;
246
246
  uncork(): void;
247
247
  }
node v12.20/url.d.ts CHANGED
@@ -103,7 +103,7 @@ declare module 'url' {
103
103
  append(name: string, value: string): void;
104
104
  delete(name: string): void;
105
105
  entries(): IterableIterator<[string, string]>;
106
- forEach(callback: (value: string, name: string, searchParams: this) => void): void;
106
+ forEach(callback: (value: string, name: string, searchParams: URLSearchParams) => void): void;
107
107
  get(name: string): string | null;
108
108
  getAll(name: string): string[];
109
109
  has(name: string): boolean;
@@ -114,4 +114,30 @@ declare module 'url' {
114
114
  values(): IterableIterator<string>;
115
115
  [Symbol.iterator](): IterableIterator<[string, string]>;
116
116
  }
117
+
118
+ import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
119
+ global {
120
+ interface URLSearchParams extends _URLSearchParams {}
121
+ interface URL extends _URL {}
122
+ interface Global {
123
+ URL: typeof _URL;
124
+ URLSearchParams: typeof _URLSearchParams;
125
+ }
126
+ /**
127
+ * `URL` class is a global reference for `require('url').URL`
128
+ * https://nodejs.org/api/url.html#the-whatwg-url-api
129
+ * @since v10.0.0
130
+ */
131
+ var URL: typeof globalThis extends { webkitURL: infer URL } ? URL : typeof _URL;
132
+ /**
133
+ * `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
134
+ * https://nodejs.org/api/url.html#class-urlsearchparams
135
+ * @since v10.0.0
136
+ */
137
+ var URLSearchParams: {
138
+ prototype: URLSearchParams;
139
+ new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
140
+ toString(): string;
141
+ };
142
+ }
117
143
  }