@types/node 10.11.6 → 10.12.2
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 +2 -2
- node/index.d.ts +168 -23
- node/package.json +8 -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://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 01 Nov 2018 17:34:45 GMT
|
|
12
12
|
* Dependencies: none
|
|
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 <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>.
|
|
16
|
+
These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Jeremie Rodriguez <https://github.com/jeremiergz>.
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Node.js 10.
|
|
1
|
+
// Type definitions for Node.js 10.12
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
// Wilco Bakker <https://github.com/WilcoBakker>
|
|
31
31
|
// wwwy3y3 <https://github.com/wwwy3y3>
|
|
32
32
|
// Zane Hannan AU <https://github.com/ZaneHannanAU>
|
|
33
|
+
// Jeremie Rodriguez <https://github.com/jeremiergz>
|
|
33
34
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
34
35
|
|
|
35
36
|
/** inspector module types */
|
|
@@ -108,6 +109,10 @@ interface Console {
|
|
|
108
109
|
* Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
|
|
109
110
|
*/
|
|
110
111
|
timeEnd(label?: string): void;
|
|
112
|
+
/**
|
|
113
|
+
* For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
|
|
114
|
+
*/
|
|
115
|
+
timeLog(label: string, ...data: any[]): void;
|
|
111
116
|
/**
|
|
112
117
|
* Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
|
|
113
118
|
*/
|
|
@@ -203,20 +208,20 @@ declare var console: Console;
|
|
|
203
208
|
declare var __filename: string;
|
|
204
209
|
declare var __dirname: string;
|
|
205
210
|
|
|
206
|
-
declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.
|
|
211
|
+
declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
|
|
207
212
|
declare namespace setTimeout {
|
|
208
213
|
function __promisify__(ms: number): Promise<void>;
|
|
209
214
|
function __promisify__<T>(ms: number, value: T): Promise<T>;
|
|
210
215
|
}
|
|
211
|
-
declare function clearTimeout(timeoutId: NodeJS.
|
|
212
|
-
declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.
|
|
213
|
-
declare function clearInterval(intervalId: NodeJS.
|
|
214
|
-
declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]):
|
|
216
|
+
declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
|
|
217
|
+
declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
|
|
218
|
+
declare function clearInterval(intervalId: NodeJS.Timeout): void;
|
|
219
|
+
declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
|
215
220
|
declare namespace setImmediate {
|
|
216
221
|
function __promisify__(): Promise<void>;
|
|
217
222
|
function __promisify__<T>(value: T): Promise<T>;
|
|
218
223
|
}
|
|
219
|
-
declare function clearImmediate(immediateId:
|
|
224
|
+
declare function clearImmediate(immediateId: NodeJS.Immediate): void;
|
|
220
225
|
|
|
221
226
|
// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
|
|
222
227
|
interface NodeRequireFunction {
|
|
@@ -489,6 +494,7 @@ declare namespace NodeJS {
|
|
|
489
494
|
maxArrayLength?: number | null;
|
|
490
495
|
breakLength?: number;
|
|
491
496
|
compact?: boolean;
|
|
497
|
+
sorted?: boolean | ((a: string, b: string) => number);
|
|
492
498
|
}
|
|
493
499
|
|
|
494
500
|
interface ConsoleConstructor {
|
|
@@ -687,6 +693,8 @@ declare namespace NodeJS {
|
|
|
687
693
|
"SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
|
|
688
694
|
"SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
|
|
689
695
|
|
|
696
|
+
type MultipleResolveType = 'resolve' | 'reject';
|
|
697
|
+
|
|
690
698
|
type BeforeExitListener = (code: number) => void;
|
|
691
699
|
type DisconnectListener = () => void;
|
|
692
700
|
type ExitListener = (code: number) => void;
|
|
@@ -698,6 +706,7 @@ declare namespace NodeJS {
|
|
|
698
706
|
type SignalsListener = (signal: Signals) => void;
|
|
699
707
|
type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
|
|
700
708
|
type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
|
|
709
|
+
type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
|
|
701
710
|
|
|
702
711
|
interface Socket extends ReadWriteStream {
|
|
703
712
|
isTTY?: true;
|
|
@@ -841,6 +850,7 @@ declare namespace NodeJS {
|
|
|
841
850
|
addListener(event: Signals, listener: SignalsListener): this;
|
|
842
851
|
addListener(event: "newListener", listener: NewListenerListener): this;
|
|
843
852
|
addListener(event: "removeListener", listener: RemoveListenerListener): this;
|
|
853
|
+
addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
844
854
|
|
|
845
855
|
emit(event: "beforeExit", code: number): boolean;
|
|
846
856
|
emit(event: "disconnect"): boolean;
|
|
@@ -853,6 +863,7 @@ declare namespace NodeJS {
|
|
|
853
863
|
emit(event: Signals, signal: Signals): boolean;
|
|
854
864
|
emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
|
|
855
865
|
emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
|
|
866
|
+
emit(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
856
867
|
|
|
857
868
|
on(event: "beforeExit", listener: BeforeExitListener): this;
|
|
858
869
|
on(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -865,6 +876,7 @@ declare namespace NodeJS {
|
|
|
865
876
|
on(event: Signals, listener: SignalsListener): this;
|
|
866
877
|
on(event: "newListener", listener: NewListenerListener): this;
|
|
867
878
|
on(event: "removeListener", listener: RemoveListenerListener): this;
|
|
879
|
+
on(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
868
880
|
|
|
869
881
|
once(event: "beforeExit", listener: BeforeExitListener): this;
|
|
870
882
|
once(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -877,6 +889,7 @@ declare namespace NodeJS {
|
|
|
877
889
|
once(event: Signals, listener: SignalsListener): this;
|
|
878
890
|
once(event: "newListener", listener: NewListenerListener): this;
|
|
879
891
|
once(event: "removeListener", listener: RemoveListenerListener): this;
|
|
892
|
+
once(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
880
893
|
|
|
881
894
|
prependListener(event: "beforeExit", listener: BeforeExitListener): this;
|
|
882
895
|
prependListener(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -889,6 +902,7 @@ declare namespace NodeJS {
|
|
|
889
902
|
prependListener(event: Signals, listener: SignalsListener): this;
|
|
890
903
|
prependListener(event: "newListener", listener: NewListenerListener): this;
|
|
891
904
|
prependListener(event: "removeListener", listener: RemoveListenerListener): this;
|
|
905
|
+
prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
892
906
|
|
|
893
907
|
prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
|
|
894
908
|
prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -901,6 +915,7 @@ declare namespace NodeJS {
|
|
|
901
915
|
prependOnceListener(event: Signals, listener: SignalsListener): this;
|
|
902
916
|
prependOnceListener(event: "newListener", listener: NewListenerListener): this;
|
|
903
917
|
prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
|
|
918
|
+
prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
904
919
|
|
|
905
920
|
listeners(event: "beforeExit"): BeforeExitListener[];
|
|
906
921
|
listeners(event: "disconnect"): DisconnectListener[];
|
|
@@ -913,6 +928,7 @@ declare namespace NodeJS {
|
|
|
913
928
|
listeners(event: Signals): SignalsListener[];
|
|
914
929
|
listeners(event: "newListener"): NewListenerListener[];
|
|
915
930
|
listeners(event: "removeListener"): RemoveListenerListener[];
|
|
931
|
+
listeners(event: "multipleResolves"): MultipleResolveListener[];
|
|
916
932
|
}
|
|
917
933
|
|
|
918
934
|
interface Global {
|
|
@@ -955,9 +971,9 @@ declare namespace NodeJS {
|
|
|
955
971
|
Uint8ClampedArray: Function;
|
|
956
972
|
WeakMap: WeakMapConstructor;
|
|
957
973
|
WeakSet: WeakSetConstructor;
|
|
958
|
-
clearImmediate: (immediateId:
|
|
959
|
-
clearInterval: (intervalId:
|
|
960
|
-
clearTimeout: (timeoutId:
|
|
974
|
+
clearImmediate: (immediateId: Immediate) => void;
|
|
975
|
+
clearInterval: (intervalId: Timeout) => void;
|
|
976
|
+
clearTimeout: (timeoutId: Timeout) => void;
|
|
961
977
|
console: typeof console;
|
|
962
978
|
decodeURI: typeof decodeURI;
|
|
963
979
|
decodeURIComponent: typeof decodeURIComponent;
|
|
@@ -972,9 +988,9 @@ declare namespace NodeJS {
|
|
|
972
988
|
parseInt: typeof parseInt;
|
|
973
989
|
process: Process;
|
|
974
990
|
root: Global;
|
|
975
|
-
setImmediate: (callback: (...args: any[]) => void, ...args: any[]) =>
|
|
976
|
-
setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) =>
|
|
977
|
-
setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) =>
|
|
991
|
+
setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
|
|
992
|
+
setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
|
|
993
|
+
setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout;
|
|
978
994
|
undefined: typeof undefined;
|
|
979
995
|
unescape: (str: string) => string;
|
|
980
996
|
gc: () => void;
|
|
@@ -982,13 +998,27 @@ declare namespace NodeJS {
|
|
|
982
998
|
}
|
|
983
999
|
|
|
984
1000
|
interface Timer {
|
|
1001
|
+
ref(): void;
|
|
1002
|
+
refresh(): void;
|
|
1003
|
+
unref(): void;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
class Immediate {
|
|
985
1007
|
ref(): void;
|
|
986
1008
|
unref(): void;
|
|
1009
|
+
_onImmediate: Function; // to distinguish it from the Timeout class
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
class Timeout implements Timer {
|
|
1013
|
+
ref(): void;
|
|
1014
|
+
refresh(): void;
|
|
1015
|
+
unref(): void;
|
|
987
1016
|
}
|
|
988
1017
|
|
|
989
1018
|
class Module {
|
|
990
1019
|
static runMain(): void;
|
|
991
1020
|
static wrap(code: string): string;
|
|
1021
|
+
static createRequireFromPath(path: string): (path: string) => any;
|
|
992
1022
|
static builtinModules: string[];
|
|
993
1023
|
|
|
994
1024
|
static Module: typeof Module;
|
|
@@ -2601,6 +2631,20 @@ declare module "url" {
|
|
|
2601
2631
|
function domainToASCII(domain: string): string;
|
|
2602
2632
|
function domainToUnicode(domain: string): string;
|
|
2603
2633
|
|
|
2634
|
+
/**
|
|
2635
|
+
* This function ensures the correct decodings of percent-encoded characters as
|
|
2636
|
+
* well as ensuring a cross-platform valid absolute path string.
|
|
2637
|
+
* @param url The file URL string or URL object to convert to a path.
|
|
2638
|
+
*/
|
|
2639
|
+
function fileURLToPath(url: string | URL): string;
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* This function ensures that path is resolved absolutely, and that the URL
|
|
2643
|
+
* control characters are correctly encoded when converting into a File URL.
|
|
2644
|
+
* @param url The path to convert to a File URL.
|
|
2645
|
+
*/
|
|
2646
|
+
function pathToFileURL(url: string): URL;
|
|
2647
|
+
|
|
2604
2648
|
interface URLFormatOptions {
|
|
2605
2649
|
auth?: boolean;
|
|
2606
2650
|
fragment?: boolean;
|
|
@@ -3977,12 +4021,25 @@ declare module "fs" {
|
|
|
3977
4021
|
*/
|
|
3978
4022
|
function rmdirSync(path: PathLike): void;
|
|
3979
4023
|
|
|
4024
|
+
export interface MakeDirectoryOptions {
|
|
4025
|
+
/**
|
|
4026
|
+
* Indicates whether parent folders should be created.
|
|
4027
|
+
* @default false
|
|
4028
|
+
*/
|
|
4029
|
+
recursive?: boolean;
|
|
4030
|
+
/**
|
|
4031
|
+
* A file mode. If a string is passed, it is parsed as an octal integer. If not specified
|
|
4032
|
+
* @default 0o777.
|
|
4033
|
+
*/
|
|
4034
|
+
mode?: number;
|
|
4035
|
+
}
|
|
4036
|
+
|
|
3980
4037
|
/**
|
|
3981
4038
|
* Asynchronous mkdir(2) - create a directory.
|
|
3982
4039
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3983
4040
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
3984
4041
|
*/
|
|
3985
|
-
function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4042
|
+
function mkdir(path: PathLike, mode: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3986
4043
|
|
|
3987
4044
|
/**
|
|
3988
4045
|
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
|
@@ -3997,7 +4054,7 @@ declare module "fs" {
|
|
|
3997
4054
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3998
4055
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
3999
4056
|
*/
|
|
4000
|
-
function __promisify__(path: PathLike, mode?: number | string | null): Promise<void>;
|
|
4057
|
+
function __promisify__(path: PathLike, mode?: number | string | MakeDirectoryOptions | null): Promise<void>;
|
|
4001
4058
|
}
|
|
4002
4059
|
|
|
4003
4060
|
/**
|
|
@@ -4005,7 +4062,7 @@ declare module "fs" {
|
|
|
4005
4062
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4006
4063
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
4007
4064
|
*/
|
|
4008
|
-
function mkdirSync(path: PathLike, mode?: number | string | null): void;
|
|
4065
|
+
function mkdirSync(path: PathLike, mode?: number | string | MakeDirectoryOptions | null): void;
|
|
4009
4066
|
|
|
4010
4067
|
/**
|
|
4011
4068
|
* Asynchronously creates a unique temporary directory.
|
|
@@ -5609,7 +5666,7 @@ declare module "path" {
|
|
|
5609
5666
|
/**
|
|
5610
5667
|
* The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
|
|
5611
5668
|
*
|
|
5612
|
-
* Starting from leftmost {from}
|
|
5669
|
+
* Starting from leftmost {from} parameter, resolves {to} to an absolute path.
|
|
5613
5670
|
*
|
|
5614
5671
|
* If {to} isn't already absolute, {from} arguments are prepended in right to left order,
|
|
5615
5672
|
* until an absolute path is found. If after using all {from} paths still no absolute path is found,
|
|
@@ -6332,6 +6389,88 @@ declare module "crypto" {
|
|
|
6332
6389
|
function timingSafeEqual(a: Buffer | NodeJS.TypedArray | DataView, b: Buffer | NodeJS.TypedArray | DataView): boolean;
|
|
6333
6390
|
/** @deprecated since v10.0.0 */
|
|
6334
6391
|
const DEFAULT_ENCODING: string;
|
|
6392
|
+
|
|
6393
|
+
export type KeyType = 'rsa' | 'dsa' | 'ec';
|
|
6394
|
+
export type KeyFormat = 'pem' | 'der';
|
|
6395
|
+
|
|
6396
|
+
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
6397
|
+
format: T;
|
|
6398
|
+
cipher: string;
|
|
6399
|
+
passphrase: string;
|
|
6400
|
+
}
|
|
6401
|
+
|
|
6402
|
+
interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
6403
|
+
/**
|
|
6404
|
+
* Key size in bits
|
|
6405
|
+
*/
|
|
6406
|
+
modulusLength: number;
|
|
6407
|
+
/**
|
|
6408
|
+
* @default 0x10001
|
|
6409
|
+
*/
|
|
6410
|
+
publicExponent?: number;
|
|
6411
|
+
|
|
6412
|
+
publicKeyEncoding: {
|
|
6413
|
+
type: 'pkcs1' | 'spki';
|
|
6414
|
+
format: PubF;
|
|
6415
|
+
};
|
|
6416
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
6417
|
+
type: 'pkcs1' | 'pkcs8';
|
|
6418
|
+
};
|
|
6419
|
+
}
|
|
6420
|
+
|
|
6421
|
+
interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
6422
|
+
/**
|
|
6423
|
+
* Key size in bits
|
|
6424
|
+
*/
|
|
6425
|
+
modulusLength: number;
|
|
6426
|
+
/**
|
|
6427
|
+
* Size of q in bits
|
|
6428
|
+
*/
|
|
6429
|
+
divisorLength: number;
|
|
6430
|
+
|
|
6431
|
+
publicKeyEncoding: {
|
|
6432
|
+
type: 'spki';
|
|
6433
|
+
format: PubF;
|
|
6434
|
+
};
|
|
6435
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
6436
|
+
type: 'pkcs8';
|
|
6437
|
+
};
|
|
6438
|
+
}
|
|
6439
|
+
|
|
6440
|
+
interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
6441
|
+
/**
|
|
6442
|
+
* Name of the curve to use.
|
|
6443
|
+
*/
|
|
6444
|
+
namedCurve: string;
|
|
6445
|
+
|
|
6446
|
+
publicKeyEncoding: {
|
|
6447
|
+
type: 'pkcs1' | 'spki';
|
|
6448
|
+
format: PubF;
|
|
6449
|
+
};
|
|
6450
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
6451
|
+
type: 'sec1' | 'pkcs8';
|
|
6452
|
+
};
|
|
6453
|
+
}
|
|
6454
|
+
|
|
6455
|
+
interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
|
|
6456
|
+
publicKey: T1;
|
|
6457
|
+
privateKey: T2;
|
|
6458
|
+
}
|
|
6459
|
+
|
|
6460
|
+
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
6461
|
+
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
6462
|
+
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
6463
|
+
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
6464
|
+
|
|
6465
|
+
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
6466
|
+
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
6467
|
+
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
6468
|
+
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
6469
|
+
|
|
6470
|
+
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
6471
|
+
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
6472
|
+
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
6473
|
+
function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
6335
6474
|
}
|
|
6336
6475
|
|
|
6337
6476
|
declare module "stream" {
|
|
@@ -7207,20 +7346,20 @@ declare module "v8" {
|
|
|
7207
7346
|
}
|
|
7208
7347
|
|
|
7209
7348
|
declare module "timers" {
|
|
7210
|
-
function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.
|
|
7349
|
+
function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
|
|
7211
7350
|
namespace setTimeout {
|
|
7212
7351
|
function __promisify__(ms: number): Promise<void>;
|
|
7213
7352
|
function __promisify__<T>(ms: number, value: T): Promise<T>;
|
|
7214
7353
|
}
|
|
7215
|
-
function clearTimeout(timeoutId: NodeJS.
|
|
7216
|
-
function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.
|
|
7217
|
-
function clearInterval(intervalId: NodeJS.
|
|
7218
|
-
function setImmediate(callback: (...args: any[]) => void, ...args: any[]):
|
|
7354
|
+
function clearTimeout(timeoutId: NodeJS.Timeout): void;
|
|
7355
|
+
function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
|
|
7356
|
+
function clearInterval(intervalId: NodeJS.Timeout): void;
|
|
7357
|
+
function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
|
7219
7358
|
namespace setImmediate {
|
|
7220
7359
|
function __promisify__(): Promise<void>;
|
|
7221
7360
|
function __promisify__<T>(value: T): Promise<T>;
|
|
7222
7361
|
}
|
|
7223
|
-
function clearImmediate(immediateId:
|
|
7362
|
+
function clearImmediate(immediateId: NodeJS.Immediate): void;
|
|
7224
7363
|
}
|
|
7225
7364
|
|
|
7226
7365
|
declare module "console" {
|
|
@@ -7648,6 +7787,7 @@ declare module "http2" {
|
|
|
7648
7787
|
addListener(event: "localSettings", listener: (settings: Settings) => void): this;
|
|
7649
7788
|
addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
|
|
7650
7789
|
addListener(event: "timeout", listener: () => void): this;
|
|
7790
|
+
addListener(event: "ping", listener: () => void): this;
|
|
7651
7791
|
|
|
7652
7792
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
7653
7793
|
emit(event: "close"): boolean;
|
|
@@ -7657,6 +7797,7 @@ declare module "http2" {
|
|
|
7657
7797
|
emit(event: "localSettings", settings: Settings): boolean;
|
|
7658
7798
|
emit(event: "remoteSettings", settings: Settings): boolean;
|
|
7659
7799
|
emit(event: "timeout"): boolean;
|
|
7800
|
+
emit(event: "ping"): boolean;
|
|
7660
7801
|
|
|
7661
7802
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
7662
7803
|
on(event: "close", listener: () => void): this;
|
|
@@ -7666,6 +7807,7 @@ declare module "http2" {
|
|
|
7666
7807
|
on(event: "localSettings", listener: (settings: Settings) => void): this;
|
|
7667
7808
|
on(event: "remoteSettings", listener: (settings: Settings) => void): this;
|
|
7668
7809
|
on(event: "timeout", listener: () => void): this;
|
|
7810
|
+
on(event: "ping", listener: () => void): this;
|
|
7669
7811
|
|
|
7670
7812
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
7671
7813
|
once(event: "close", listener: () => void): this;
|
|
@@ -7675,6 +7817,7 @@ declare module "http2" {
|
|
|
7675
7817
|
once(event: "localSettings", listener: (settings: Settings) => void): this;
|
|
7676
7818
|
once(event: "remoteSettings", listener: (settings: Settings) => void): this;
|
|
7677
7819
|
once(event: "timeout", listener: () => void): this;
|
|
7820
|
+
once(event: "ping", listener: () => void): this;
|
|
7678
7821
|
|
|
7679
7822
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
7680
7823
|
prependListener(event: "close", listener: () => void): this;
|
|
@@ -7684,6 +7827,7 @@ declare module "http2" {
|
|
|
7684
7827
|
prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
|
|
7685
7828
|
prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
|
|
7686
7829
|
prependListener(event: "timeout", listener: () => void): this;
|
|
7830
|
+
prependListener(event: "ping", listener: () => void): this;
|
|
7687
7831
|
|
|
7688
7832
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
7689
7833
|
prependOnceListener(event: "close", listener: () => void): this;
|
|
@@ -7693,6 +7837,7 @@ declare module "http2" {
|
|
|
7693
7837
|
prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
|
|
7694
7838
|
prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
|
|
7695
7839
|
prependOnceListener(event: "timeout", listener: () => void): this;
|
|
7840
|
+
prependOnceListener(event: "ping", listener: () => void): this;
|
|
7696
7841
|
}
|
|
7697
7842
|
|
|
7698
7843
|
export interface ClientHttp2Session extends Http2Session {
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.12.2",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -153,15 +153,21 @@
|
|
|
153
153
|
"name": "Zane Hannan AU",
|
|
154
154
|
"url": "https://github.com/ZaneHannanAU",
|
|
155
155
|
"githubUsername": "ZaneHannanAU"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "Jeremie Rodriguez",
|
|
159
|
+
"url": "https://github.com/jeremiergz",
|
|
160
|
+
"githubUsername": "jeremiergz"
|
|
156
161
|
}
|
|
157
162
|
],
|
|
158
163
|
"main": "",
|
|
164
|
+
"types": "",
|
|
159
165
|
"repository": {
|
|
160
166
|
"type": "git",
|
|
161
167
|
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
|
|
162
168
|
},
|
|
163
169
|
"scripts": {},
|
|
164
170
|
"dependencies": {},
|
|
165
|
-
"typesPublisherContentHash": "
|
|
171
|
+
"typesPublisherContentHash": "fdd261d8129f1041a7848c68af3ab29b54ffa6b7123336a438ca6006cbac9b07",
|
|
166
172
|
"typeScriptVersion": "2.0"
|
|
167
173
|
}
|