@types/node 11.15.54 → 12.0.3

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 (56) hide show
  1. node v11.15/LICENSE → node/LICENSE +21 -21
  2. node/README.md +16 -0
  3. node v11.15/ts3.6/assert.d.ts → node/assert.d.ts +12 -33
  4. node v11.15/async_hooks.d.ts → node/async_hooks.d.ts +3 -15
  5. node/base.d.ts +41 -0
  6. {node v11.15 → node}/buffer.d.ts +0 -0
  7. node v11.15/child_process.d.ts → node/child_process.d.ts +8 -10
  8. {node v11.15 → node}/cluster.d.ts +0 -0
  9. {node v11.15 → node}/console.d.ts +0 -0
  10. node v11.15/constants.d.ts → node/constants.d.ts +0 -36
  11. node v11.15/crypto.d.ts → node/crypto.d.ts +114 -266
  12. node v11.15/dgram.d.ts → node/dgram.d.ts +1 -1
  13. node v11.15/dns.d.ts → node/dns.d.ts +1 -75
  14. node/domain.d.ts +16 -0
  15. node/events.d.ts +30 -0
  16. node v11.15/fs.d.ts → node/fs.d.ts +6 -7
  17. node v11.15/globals.d.ts → node/globals.d.ts +18 -93
  18. node v11.15/http.d.ts → node/http.d.ts +5 -10
  19. node v11.15/http2.d.ts → node/http2.d.ts +3 -3
  20. {node v11.15 → node}/https.d.ts +0 -0
  21. node/index.d.ts +99 -0
  22. node v11.15/inspector.d.ts → node/inspector.d.ts +2 -2
  23. {node v11.15 → node}/module.d.ts +0 -0
  24. {node v11.15 → node}/net.d.ts +0 -0
  25. node v11.15/os.d.ts → node/os.d.ts +0 -4
  26. node v11.15/package.json → node/package.json +39 -24
  27. {node v11.15 → node}/path.d.ts +0 -0
  28. node v11.15/perf_hooks.d.ts → node/perf_hooks.d.ts +77 -5
  29. {node v11.15 → node}/process.d.ts +0 -0
  30. node/punycode.d.ts +12 -0
  31. node v11.15/querystring.d.ts → node/querystring.d.ts +4 -1
  32. node v11.15/readline.d.ts → node/readline.d.ts +1 -2
  33. node v11.15/repl.d.ts → node/repl.d.ts +5 -13
  34. node v11.15/stream.d.ts → node/stream.d.ts +6 -16
  35. {node v11.15 → node}/string_decoder.d.ts +0 -0
  36. {node v11.15 → node}/timers.d.ts +0 -0
  37. node v11.15/tls.d.ts → node/tls.d.ts +3 -4
  38. {node v11.15 → node}/trace_events.d.ts +0 -0
  39. node/ts3.2/globals.d.ts +19 -0
  40. node v11.15/base.d.ts → node/ts3.2/index.d.ts +7 -6
  41. node/ts3.2/util.d.ts +15 -0
  42. node v11.15/tty.d.ts → node/tty.d.ts +0 -2
  43. node v11.15/url.d.ts → node/url.d.ts +1 -7
  44. node v11.15/util.d.ts → node/util.d.ts +20 -49
  45. {node v11.15 → node}/v8.d.ts +0 -0
  46. node v11.15/vm.d.ts → node/vm.d.ts +2 -4
  47. node v11.15/worker_threads.d.ts → node/worker_threads.d.ts +2 -4
  48. node v11.15/zlib.d.ts → node/zlib.d.ts +0 -1
  49. node v11.15/README.md +0 -16
  50. node v11.15/assert.d.ts +0 -99
  51. node v11.15/domain.d.ts +0 -16
  52. node v11.15/events.d.ts +0 -30
  53. node v11.15/index.d.ts +0 -43
  54. node v11.15/punycode.d.ts +0 -68
  55. node v11.15/ts3.6/base.d.ts +0 -54
  56. node v11.15/ts3.6/index.d.ts +0 -6
node/domain.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ declare module "domain" {
2
+ import * as events from "events";
3
+
4
+ class Domain extends events.EventEmitter implements NodeJS.Domain {
5
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
6
+ add(emitter: events.EventEmitter | NodeJS.Timer): void;
7
+ remove(emitter: events.EventEmitter | NodeJS.Timer): void;
8
+ bind<T extends Function>(cb: T): T;
9
+ intercept<T extends Function>(cb: T): T;
10
+ members: Array<events.EventEmitter | NodeJS.Timer>;
11
+ enter(): void;
12
+ exit(): void;
13
+ }
14
+
15
+ function create(): Domain;
16
+ }
node/events.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ declare module "events" {
2
+ class internal extends NodeJS.EventEmitter { }
3
+
4
+ namespace internal {
5
+ function once(emitter: EventEmitter, event: string | symbol): Promise<any[]>;
6
+ class EventEmitter extends internal {
7
+ /** @deprecated since v4.0.0 */
8
+ static listenerCount(emitter: EventEmitter, event: string | symbol): number;
9
+ static defaultMaxListeners: number;
10
+
11
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
12
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
13
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
14
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
15
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
16
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
17
+ off(event: string | symbol, listener: (...args: any[]) => void): this;
18
+ removeAllListeners(event?: string | symbol): this;
19
+ setMaxListeners(n: number): this;
20
+ getMaxListeners(): number;
21
+ listeners(event: string | symbol): Function[];
22
+ rawListeners(event: string | symbol): Function[];
23
+ emit(event: string | symbol, ...args: any[]): boolean;
24
+ eventNames(): Array<string | symbol>;
25
+ listenerCount(type: string | symbol): number;
26
+ }
27
+ }
28
+
29
+ export = internal;
30
+ }
@@ -442,7 +442,7 @@ declare module "fs" {
442
442
  * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
443
443
  * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
444
444
  */
445
- function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
445
+ function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
446
446
  }
447
447
 
448
448
  /**
@@ -710,7 +710,7 @@ declare module "fs" {
710
710
  * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
711
711
  * @default 0o777.
712
712
  */
713
- mode?: number | string;
713
+ mode?: number;
714
714
  }
715
715
 
716
716
  /**
@@ -858,7 +858,7 @@ declare module "fs" {
858
858
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
859
859
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
860
860
  */
861
- function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
861
+ function readdir(path: PathLike, options: { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
862
862
 
863
863
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
864
864
  namespace readdir {
@@ -888,7 +888,7 @@ declare module "fs" {
888
888
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
889
889
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
890
890
  */
891
- function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<Dirent[]>;
891
+ function __promisify__(path: PathLike, options: { withFileTypes: true }): Promise<Dirent[]>;
892
892
  }
893
893
 
894
894
  /**
@@ -913,11 +913,11 @@ declare module "fs" {
913
913
  function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[];
914
914
 
915
915
  /**
916
- * Synchronous readdir(3) - read a directory.
916
+ * Asynchronous readdir(3) - read a directory.
917
917
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
918
918
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
919
919
  */
920
- function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[];
920
+ function readdirSync(path: PathLike, options: { withFileTypes: true }): Dirent[];
921
921
 
922
922
  /**
923
923
  * Asynchronous close(2) - close a file descriptor.
@@ -1724,7 +1724,6 @@ declare module "fs" {
1724
1724
  mode?: number;
1725
1725
  autoClose?: boolean;
1726
1726
  start?: number;
1727
- highWaterMark?: number;
1728
1727
  }): WriteStream;
1729
1728
 
1730
1729
  /**
@@ -62,7 +62,7 @@ interface Console {
62
62
  * This method does not display anything unless used in the inspector.
63
63
  * Prints to `stdout` the array `array` formatted as a table.
64
64
  */
65
- table(tabularData: any, properties?: ReadonlyArray<string>): void;
65
+ table(tabularData: any, properties?: string[]): void;
66
66
  /**
67
67
  * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
68
68
  */
@@ -152,11 +152,6 @@ interface String {
152
152
  trimLeft(): string;
153
153
  /** Removes whitespace from the right end of a string. */
154
154
  trimRight(): string;
155
-
156
- /** Returns a copy with leading whitespace removed. */
157
- trimStart(): string;
158
- /** Returns a copy with trailing whitespace removed. */
159
- trimEnd(): string;
160
155
  }
161
156
 
162
157
  /*-----------------------------------------------*
@@ -193,6 +188,7 @@ declare function queueMicrotask(callback: () => void): void;
193
188
 
194
189
  // TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
195
190
  interface NodeRequireFunction {
191
+ /* tslint:disable-next-line:callable-types */
196
192
  (id: string): any;
197
193
  }
198
194
 
@@ -228,12 +224,6 @@ interface NodeModule {
228
224
  loaded: boolean;
229
225
  parent: NodeModule | null;
230
226
  children: NodeModule[];
231
- /**
232
- * @since 11.14.0
233
- *
234
- * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
235
- */
236
- path: string;
237
227
  paths: string[];
238
228
  }
239
229
 
@@ -348,7 +338,7 @@ declare const Buffer: {
348
338
  * @param array The octets to store.
349
339
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
350
340
  */
351
- new(array: ReadonlyArray<any>): Buffer;
341
+ new(array: any[]): Buffer;
352
342
  /**
353
343
  * Copies the passed {buffer} data onto a new {Buffer} instance.
354
344
  *
@@ -370,14 +360,8 @@ declare const Buffer: {
370
360
  * Creates a new Buffer using the passed {data}
371
361
  * @param data data to create a new Buffer
372
362
  */
373
- from(data: ReadonlyArray<number>): Buffer;
363
+ from(data: number[]): Buffer;
374
364
  from(data: Uint8Array): Buffer;
375
- /**
376
- * Creates a new buffer containing the coerced value of an object
377
- * A `TypeError` will be thrown if {obj} has not mentioned methods or is not of other type appropriate for `Buffer.from()` variants.
378
- * @param obj An object supporting `Symbol.toPrimitive` or `valueOf()`.
379
- */
380
- from(obj: { valueOf(): string | object } | { [Symbol.toPrimitive](hint: 'string'): string }, byteOffset?: number, length?: number): Buffer;
381
365
  /**
382
366
  * Creates a new Buffer containing the given JavaScript string {str}.
383
367
  * If provided, the {encoding} parameter identifies the character encoding.
@@ -421,7 +405,7 @@ declare const Buffer: {
421
405
  * @param totalLength Total length of the buffers when concatenated.
422
406
  * 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.
423
407
  */
424
- concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
408
+ concat(list: Uint8Array[], totalLength?: number): Buffer;
425
409
  /**
426
410
  * The same as buf1.compare(buf2).
427
411
  */
@@ -735,7 +719,6 @@ declare namespace NodeJS {
735
719
  destroy(error?: Error): void;
736
720
  }
737
721
  interface ReadStream extends Socket {
738
- readonly readableFlowing: boolean | null;
739
722
  readonly readableHighWaterMark: number;
740
723
  readonly readableLength: number;
741
724
  isRaw?: boolean;
@@ -748,7 +731,6 @@ declare namespace NodeJS {
748
731
 
749
732
  interface HRTime {
750
733
  (time?: [number, number]): [number, number];
751
- bigint(): bigint;
752
734
  }
753
735
 
754
736
  interface ProcessReport {
@@ -816,32 +798,6 @@ declare namespace NodeJS {
816
798
  writeReport(fileName?: string, err?: Error): string;
817
799
  }
818
800
 
819
- interface EmitWarningOptions {
820
- /**
821
- * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
822
- *
823
- * @default 'Warning'
824
- */
825
- type?: string;
826
-
827
- /**
828
- * A unique identifier for the warning instance being emitted.
829
- */
830
- code?: string;
831
-
832
- /**
833
- * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
834
- *
835
- * @default process.emitWarning
836
- */
837
- ctor?: Function;
838
-
839
- /**
840
- * Additional text to include with the error.
841
- */
842
- detail?: string;
843
- }
844
-
845
801
  interface Process extends EventEmitter {
846
802
  /**
847
803
  * Can also be a tty.WriteStream, not typed due to limitation.s
@@ -857,29 +813,14 @@ declare namespace NodeJS {
857
813
  argv0: string;
858
814
  execArgv: string[];
859
815
  execPath: string;
860
- abort(): never;
816
+ abort(): void;
861
817
  chdir(directory: string): void;
862
818
  cwd(): string;
863
819
  debugPort: number;
864
-
865
- /**
866
- * The `process.emitWarning()` method can be used to emit custom or application specific process warnings.
867
- *
868
- * These can be listened for by adding a handler to the `'warning'` event.
869
- *
870
- * @param warning The warning to emit.
871
- * @param type When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. Default: `'Warning'`.
872
- * @param code A unique identifier for the warning instance being emitted.
873
- * @param ctor When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. Default: `process.emitWarning`.
874
- */
875
- emitWarning(warning: string | Error, ctor?: Function): void;
876
- emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
877
- emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
878
- emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
879
-
820
+ emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
880
821
  env: ProcessEnv;
881
822
  exit(code?: number): never;
882
- exitCode?: number;
823
+ exitCode: number;
883
824
  getgid(): number;
884
825
  setgid(id: number | string): void;
885
826
  getuid(): number;
@@ -889,7 +830,7 @@ declare namespace NodeJS {
889
830
  getegid(): number;
890
831
  setegid(id: number | string): void;
891
832
  getgroups(): number[];
892
- setgroups(groups: ReadonlyArray<string | number>): void;
833
+ setgroups(groups: Array<string | number>): void;
893
834
  setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
894
835
  hasUncaughtExceptionCaptureCallback(): boolean;
895
836
  version: string;
@@ -1140,25 +1081,21 @@ declare namespace NodeJS {
1140
1081
  }
1141
1082
 
1142
1083
  interface Timer {
1143
- hasRef(): boolean;
1144
- ref(): this;
1145
- refresh(): this;
1146
- unref(): this;
1084
+ ref(): void;
1085
+ refresh(): void;
1086
+ unref(): void;
1147
1087
  }
1148
1088
 
1149
1089
  class Immediate {
1150
- hasRef(): boolean;
1151
- ref(): this;
1152
- refresh(): this;
1153
- unref(): this;
1090
+ ref(): void;
1091
+ unref(): void;
1154
1092
  _onImmediate: Function; // to distinguish it from the Timeout class
1155
1093
  }
1156
1094
 
1157
1095
  class Timeout implements Timer {
1158
- hasRef(): boolean;
1159
- ref(): this;
1160
- refresh(): this;
1161
- unref(): this;
1096
+ ref(): void;
1097
+ refresh(): void;
1098
+ unref(): void;
1162
1099
  }
1163
1100
 
1164
1101
  class Module {
@@ -1181,17 +1118,5 @@ declare namespace NodeJS {
1181
1118
  constructor(id: string, parent?: Module);
1182
1119
  }
1183
1120
 
1184
- type TypedArray =
1185
- | Uint8Array
1186
- | Uint8ClampedArray
1187
- | Uint16Array
1188
- | Uint32Array
1189
- | Int8Array
1190
- | Int16Array
1191
- | Int32Array
1192
- | BigUint64Array
1193
- | BigInt64Array
1194
- | Float32Array
1195
- | Float64Array;
1196
- type ArrayBufferView = TypedArray | DataView;
1121
+ type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
1197
1122
  }
@@ -16,8 +16,6 @@ declare module "http" {
16
16
  'access-control-allow-origin'?: string;
17
17
  'access-control-expose-headers'?: string;
18
18
  'access-control-max-age'?: string;
19
- 'access-control-request-headers'?: string;
20
- 'access-control-request-method'?: string;
21
19
  'age'?: string;
22
20
  'allow'?: string;
23
21
  'alt-svc'?: string;
@@ -33,7 +31,6 @@ declare module "http" {
33
31
  'content-type'?: string;
34
32
  'cookie'?: string;
35
33
  'date'?: string;
36
- 'etag'?: string;
37
34
  'expect'?: string;
38
35
  'expires'?: string;
39
36
  'forwarded'?: string;
@@ -45,7 +42,6 @@ declare module "http" {
45
42
  'if-unmodified-since'?: string;
46
43
  'last-modified'?: string;
47
44
  'location'?: string;
48
- 'origin'?: string;
49
45
  'pragma'?: string;
50
46
  'proxy-authenticate'?: string;
51
47
  'proxy-authorization'?: string;
@@ -136,13 +132,13 @@ declare module "http" {
136
132
  constructor();
137
133
 
138
134
  setTimeout(msecs: number, callback?: () => void): this;
139
- setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
135
+ setHeader(name: string, value: number | string | string[]): void;
140
136
  getHeader(name: string): number | string | string[] | undefined;
141
137
  getHeaders(): OutgoingHttpHeaders;
142
138
  getHeaderNames(): string[];
143
139
  hasHeader(name: string): boolean;
144
140
  removeHeader(name: string): void;
145
- addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
141
+ addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void;
146
142
  flushHeaders(): void;
147
143
  }
148
144
 
@@ -162,15 +158,14 @@ declare module "http" {
162
158
  writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
163
159
  }
164
160
 
165
- // https://github.com/nodejs/node/blob/v11.15.0/lib/_http_client.js#L64
161
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
166
162
  class ClientRequest extends OutgoingMessage {
167
163
  connection: Socket;
168
164
  socket: Socket;
169
- aborted: boolean;
165
+ aborted: number;
170
166
 
171
167
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
172
168
 
173
- method: string;
174
169
  readonly path: string;
175
170
  abort(): void;
176
171
  onSocket(socket: Socket): void;
@@ -191,7 +186,7 @@ declare module "http" {
191
186
  rawHeaders: string[];
192
187
  trailers: { [key: string]: string | undefined };
193
188
  rawTrailers: string[];
194
- setTimeout(msecs: number, callback?: () => void): this;
189
+ setTimeout(msecs: number, callback: () => void): this;
195
190
  /**
196
191
  * Only valid for request obtained from http.Server.
197
192
  */
@@ -364,7 +364,7 @@ declare module "http2" {
364
364
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
365
365
 
366
366
  emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
367
- emit(event: "origin", origins: ReadonlyArray<string>): boolean;
367
+ emit(event: "origin", origins: string[]): boolean;
368
368
  emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
369
369
  emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
370
370
  emit(event: string | symbol, ...args: any[]): boolean;
@@ -649,7 +649,7 @@ declare module "http2" {
649
649
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
650
650
  }
651
651
 
652
- export class Http2ServerResponse extends stream.Writable {
652
+ export class Http2ServerResponse extends stream.Stream {
653
653
  private constructor();
654
654
 
655
655
  addTrailers(trailers: OutgoingHttpHeaders): void;
@@ -665,7 +665,7 @@ declare module "http2" {
665
665
  readonly headersSent: boolean;
666
666
  removeHeader(name: string): void;
667
667
  sendDate: boolean;
668
- setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
668
+ setHeader(name: string, value: number | string | string[]): void;
669
669
  setTimeout(msecs: number, callback?: () => void): void;
670
670
  readonly socket: net.Socket | tls.TLSSocket;
671
671
  statusCode: number;
File without changes
node/index.d.ts ADDED
@@ -0,0 +1,99 @@
1
+ // Type definitions for non-npm package Node.js 12.0
2
+ // Project: http://nodejs.org/
3
+ // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
+ // DefinitelyTyped <https://github.com/DefinitelyTyped>
5
+ // Alberto Schiabel <https://github.com/jkomyno>
6
+ // Alexander T. <https://github.com/a-tarasyuk>
7
+ // Alvis HT Tang <https://github.com/alvis>
8
+ // Andrew Makarov <https://github.com/r3nya>
9
+ // Benjamin Toueg <https://github.com/btoueg>
10
+ // Bruno Scheufler <https://github.com/brunoscheufler>
11
+ // Chigozirim C. <https://github.com/smac89>
12
+ // Christian Vaagland Tellnes <https://github.com/tellnes>
13
+ // David Junger <https://github.com/touffy>
14
+ // Deividas Bakanas <https://github.com/DeividasBakanas>
15
+ // Eugene Y. Q. Shen <https://github.com/eyqs>
16
+ // Flarna <https://github.com/Flarna>
17
+ // Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
18
+ // Hoàng Văn Khải <https://github.com/KSXGitHub>
19
+ // Huw <https://github.com/hoo29>
20
+ // Kelvin Jin <https://github.com/kjin>
21
+ // Klaus Meinhardt <https://github.com/ajafff>
22
+ // Lishude <https://github.com/islishude>
23
+ // Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
24
+ // Matthieu Sieben <https://github.com/matthieusieben>
25
+ // Mohsen Azimi <https://github.com/mohsen1>
26
+ // Nicolas Even <https://github.com/n-e>
27
+ // Nicolas Voigt <https://github.com/octo-sniffle>
28
+ // Parambir Singh <https://github.com/parambirs>
29
+ // Sebastian Silbermann <https://github.com/eps1lon>
30
+ // Simon Schick <https://github.com/SimonSchick>
31
+ // Thomas den Hollander <https://github.com/ThomasdenH>
32
+ // Wilco Bakker <https://github.com/WilcoBakker>
33
+ // wwwy3y3 <https://github.com/wwwy3y3>
34
+ // Zane Hannan AU <https://github.com/ZaneHannanAU>
35
+ // Jeremie Rodriguez <https://github.com/jeremiergz>
36
+ // Samuel Ainsworth <https://github.com/samuela>
37
+ // Kyle Uehlein <https://github.com/kuehlein>
38
+ // Jordi Oliveras Rovira <https://github.com/j-oliveras>
39
+ // Thanik Bhongbhibhat <https://github.com/bhongy>
40
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
41
+
42
+ // NOTE: These definitions support NodeJS and TypeScript 3.2.
43
+
44
+ // NOTE: TypeScript version-specific augmentations can be found in the following paths:
45
+ // - ~/base.d.ts - Shared definitions common to all TypeScript versions
46
+ // - ~/index.d.ts - Definitions specific to TypeScript 2.1
47
+ // - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2
48
+
49
+ // NOTE: Augmentations for TypeScript 3.2 and later should use individual files for overrides
50
+ // within the respective ~/ts3.2 (or later) folder. However, this is disallowed for versions
51
+ // prior to TypeScript 3.2, so the older definitions will be found here.
52
+
53
+ // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
54
+ /// <reference path="base.d.ts" />
55
+
56
+ // TypeScript 2.1-specific augmentations:
57
+
58
+ // Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`)
59
+ // Empty interfaces are used here which merge fine with the real declarations in the lib XXX files
60
+ // just to ensure the names are known and node typings can be sued without importing these libs.
61
+ // if someone really needs these types the libs need to be added via --lib or in tsconfig.json
62
+ interface MapConstructor { }
63
+ interface WeakMapConstructor { }
64
+ interface SetConstructor { }
65
+ interface WeakSetConstructor { }
66
+ interface Set<T> {}
67
+ interface Map<K, V> {}
68
+ interface ReadonlySet<T> {}
69
+ interface IteratorResult<T> { }
70
+ interface Iterable<T> { }
71
+ interface Iterator<T> {
72
+ next(value?: any): IteratorResult<T>;
73
+ }
74
+ interface IterableIterator<T> { }
75
+ interface AsyncIterableIterator<T> {}
76
+ interface SymbolConstructor {
77
+ readonly iterator: symbol;
78
+ readonly asyncIterator: symbol;
79
+ }
80
+ declare var Symbol: SymbolConstructor;
81
+ // even this is just a forward declaration some properties are added otherwise
82
+ // it would be allowed to pass anything to e.g. Buffer.from()
83
+ interface SharedArrayBuffer {
84
+ readonly byteLength: number;
85
+ slice(begin?: number, end?: number): SharedArrayBuffer;
86
+ }
87
+
88
+ declare module "util" {
89
+ namespace inspect {
90
+ const custom: symbol;
91
+ }
92
+ namespace promisify {
93
+ const custom: symbol;
94
+ }
95
+ namespace types {
96
+ function isBigInt64Array(value: any): boolean;
97
+ function isBigUint64Array(value: any): boolean;
98
+ }
99
+ }
@@ -3251,7 +3251,7 @@ declare module "inspector" {
3251
3251
  function close(): void;
3252
3252
 
3253
3253
  /**
3254
- * Return the URL of the active inspector, or `undefined` if there is none.
3254
+ * Return the URL of the active inspector, or undefined if there is none.
3255
3255
  */
3256
- function url(): string | undefined;
3256
+ function url(): string;
3257
3257
  }
File without changes
File without changes
@@ -52,7 +52,6 @@ declare module "os" {
52
52
  function userInfo(options?: { encoding: string }): UserInfo<string>;
53
53
  const constants: {
54
54
  UV_UDP_REUSEADDR: number;
55
- // signals: { [key in NodeJS.Signals]: number; }; @todo: change after migration to typescript 2.1
56
55
  signals: {
57
56
  SIGHUP: number;
58
57
  SIGINT: number;
@@ -75,7 +74,6 @@ declare module "os" {
75
74
  SIGCONT: number;
76
75
  SIGSTOP: number;
77
76
  SIGTSTP: number;
78
- SIGBREAK: number;
79
77
  SIGTTIN: number;
80
78
  SIGTTOU: number;
81
79
  SIGURG: number;
@@ -86,9 +84,7 @@ declare module "os" {
86
84
  SIGWINCH: number;
87
85
  SIGIO: number;
88
86
  SIGPOLL: number;
89
- SIGLOST: number;
90
87
  SIGPWR: number;
91
- SIGINFO: number;
92
88
  SIGSYS: number;
93
89
  SIGUNUSED: number;
94
90
  };