@types/node 6.0.90 → 6.0.94
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 v6/LICENSE +0 -0
- node v6/README.md +3 -3
- node v6/index.d.ts +164 -64
- node v6/package.json +7 -2
node v6/LICENSE
CHANGED
|
File without changes
|
node v6/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/v6
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
12
|
-
* Dependencies:
|
|
11
|
+
* Last updated: Wed, 13 Dec 2017 23:39:04 GMT
|
|
12
|
+
* Dependencies: none
|
|
13
13
|
* Global values: Buffer, NodeJS, SlowBuffer, __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>, Wilco Bakker <https://github.com/WilcoBakker>, Thomas Bouldin <https://github.com/inlined>.
|
|
16
|
+
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Wilco Bakker <https://github.com/WilcoBakker>, Thomas Bouldin <https://github.com/inlined>, Sebastian Silbermann <https://github.com/eps1lon>.
|
node v6/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Type definitions for Node.js v6.x
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
|
-
// Definitions by: Microsoft TypeScript <http://typescriptlang.org
|
|
3
|
+
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
|
4
|
+
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
|
5
|
+
// Wilco Bakker <https://github.com/WilcoBakker>
|
|
6
|
+
// Thomas Bouldin <https://github.com/inlined>
|
|
7
|
+
// Sebastian Silbermann <https://github.com/eps1lon>
|
|
4
8
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
9
|
|
|
6
10
|
/************************************************
|
|
@@ -27,8 +31,18 @@ interface Error {
|
|
|
27
31
|
stack?: string;
|
|
28
32
|
}
|
|
29
33
|
|
|
34
|
+
// Declare "static" methods in Error
|
|
30
35
|
interface ErrorConstructor {
|
|
36
|
+
/** Create .stack property on a target object */
|
|
31
37
|
captureStackTrace(targetObject: Object, constructorOpt?: Function): void;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional override for formatting stack traces
|
|
41
|
+
*
|
|
42
|
+
* @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
|
|
43
|
+
*/
|
|
44
|
+
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
45
|
+
|
|
32
46
|
stackTraceLimit: number;
|
|
33
47
|
}
|
|
34
48
|
|
|
@@ -150,8 +164,6 @@ declare var Buffer: {
|
|
|
150
164
|
prototype: Buffer;
|
|
151
165
|
/**
|
|
152
166
|
* Allocates a new Buffer using an {array} of octets.
|
|
153
|
-
*
|
|
154
|
-
* @param array
|
|
155
167
|
*/
|
|
156
168
|
from(array: any[]): Buffer;
|
|
157
169
|
/**
|
|
@@ -161,22 +173,16 @@ declare var Buffer: {
|
|
|
161
173
|
* within the {arrayBuffer} that will be shared by the Buffer.
|
|
162
174
|
*
|
|
163
175
|
* @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
|
|
164
|
-
* @param byteOffset
|
|
165
|
-
* @param length
|
|
166
176
|
*/
|
|
167
177
|
from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
|
|
168
178
|
/**
|
|
169
179
|
* Copies the passed {buffer} data onto a new Buffer instance.
|
|
170
|
-
*
|
|
171
|
-
* @param buffer
|
|
172
180
|
*/
|
|
173
181
|
from(buffer: Buffer): Buffer;
|
|
174
182
|
/**
|
|
175
183
|
* Creates a new Buffer containing the given JavaScript string {str}.
|
|
176
184
|
* If provided, the {encoding} parameter identifies the character encoding.
|
|
177
185
|
* If not provided, {encoding} defaults to 'utf8'.
|
|
178
|
-
*
|
|
179
|
-
* @param str
|
|
180
186
|
*/
|
|
181
187
|
from(str: string, encoding?: string): Buffer;
|
|
182
188
|
/**
|
|
@@ -262,6 +268,80 @@ declare namespace NodeJS {
|
|
|
262
268
|
new(stdout: WritableStream, stderr?: WritableStream): Console;
|
|
263
269
|
}
|
|
264
270
|
|
|
271
|
+
export interface CallSite {
|
|
272
|
+
/**
|
|
273
|
+
* Value of "this"
|
|
274
|
+
*/
|
|
275
|
+
getThis(): any;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Type of "this" as a string.
|
|
279
|
+
* This is the name of the function stored in the constructor field of
|
|
280
|
+
* "this", if available. Otherwise the object's [[Class]] internal
|
|
281
|
+
* property.
|
|
282
|
+
*/
|
|
283
|
+
getTypeName(): string | null;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Current function
|
|
287
|
+
*/
|
|
288
|
+
getFunction(): Function | undefined;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Name of the current function, typically its name property.
|
|
292
|
+
* If a name property is not available an attempt will be made to try
|
|
293
|
+
* to infer a name from the function's context.
|
|
294
|
+
*/
|
|
295
|
+
getFunctionName(): string | null;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Name of the property [of "this" or one of its prototypes] that holds
|
|
299
|
+
* the current function
|
|
300
|
+
*/
|
|
301
|
+
getMethodName(): string | null;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Name of the script [if this function was defined in a script]
|
|
305
|
+
*/
|
|
306
|
+
getFileName(): string | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Current line number [if this function was defined in a script]
|
|
310
|
+
*/
|
|
311
|
+
getLineNumber(): number | null;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Current column number [if this function was defined in a script]
|
|
315
|
+
*/
|
|
316
|
+
getColumnNumber(): number | null;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* A call site object representing the location where eval was called
|
|
320
|
+
* [if this function was created using a call to eval]
|
|
321
|
+
*/
|
|
322
|
+
getEvalOrigin(): string | undefined;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Is this a toplevel invocation, that is, is "this" the global object?
|
|
326
|
+
*/
|
|
327
|
+
isToplevel(): boolean;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Does this call take place in code defined by a call to eval?
|
|
331
|
+
*/
|
|
332
|
+
isEval(): boolean;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Is this call in native V8 code?
|
|
336
|
+
*/
|
|
337
|
+
isNative(): boolean;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Is this a constructor call?
|
|
341
|
+
*/
|
|
342
|
+
isConstructor(): boolean;
|
|
343
|
+
}
|
|
344
|
+
|
|
265
345
|
export interface ErrnoException extends Error {
|
|
266
346
|
errno?: number;
|
|
267
347
|
code?: string;
|
|
@@ -637,21 +717,74 @@ declare module "http" {
|
|
|
637
717
|
import * as net from "net";
|
|
638
718
|
import * as stream from "stream";
|
|
639
719
|
|
|
720
|
+
// incoming headers will never contain number
|
|
721
|
+
export interface IncomingHttpHeaders {
|
|
722
|
+
'accept'?: string;
|
|
723
|
+
'access-control-allow-origin'?: string;
|
|
724
|
+
'access-control-allow-credentials'?: string;
|
|
725
|
+
'access-control-expose-headers'?: string;
|
|
726
|
+
'access-control-max-age'?: string;
|
|
727
|
+
'access-control-allow-methods'?: string;
|
|
728
|
+
'access-control-allow-headers'?: string;
|
|
729
|
+
'accept-patch'?: string;
|
|
730
|
+
'accept-ranges'?: string;
|
|
731
|
+
'age'?: string;
|
|
732
|
+
'allow'?: string;
|
|
733
|
+
'alt-svc'?: string;
|
|
734
|
+
'cache-control'?: string;
|
|
735
|
+
'connection'?: string;
|
|
736
|
+
'content-disposition'?: string;
|
|
737
|
+
'content-encoding'?: string;
|
|
738
|
+
'content-language'?: string;
|
|
739
|
+
'content-length'?: string;
|
|
740
|
+
'content-location'?: string;
|
|
741
|
+
'content-range'?: string;
|
|
742
|
+
'content-type'?: string;
|
|
743
|
+
'date'?: string;
|
|
744
|
+
'expires'?: string;
|
|
745
|
+
'host'?: string;
|
|
746
|
+
'last-modified'?: string;
|
|
747
|
+
'location'?: string;
|
|
748
|
+
'pragma'?: string;
|
|
749
|
+
'proxy-authenticate'?: string;
|
|
750
|
+
'public-key-pins'?: string;
|
|
751
|
+
'retry-after'?: string;
|
|
752
|
+
'set-cookie'?: string[];
|
|
753
|
+
'strict-transport-security'?: string;
|
|
754
|
+
'trailer'?: string;
|
|
755
|
+
'transfer-encoding'?: string;
|
|
756
|
+
'tk'?: string;
|
|
757
|
+
'upgrade'?: string;
|
|
758
|
+
'vary'?: string;
|
|
759
|
+
'via'?: string;
|
|
760
|
+
'warning'?: string;
|
|
761
|
+
'www-authenticate'?: string;
|
|
762
|
+
[header: string]: string | string[] | undefined;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// outgoing headers allows numbers (as they are converted internally to strings)
|
|
766
|
+
export interface OutgoingHttpHeaders {
|
|
767
|
+
[header: string]: number | string | string[] | undefined;
|
|
768
|
+
}
|
|
769
|
+
|
|
640
770
|
export interface RequestOptions {
|
|
641
771
|
protocol?: string;
|
|
642
772
|
host?: string;
|
|
643
773
|
hostname?: string;
|
|
644
774
|
family?: number;
|
|
645
|
-
port?: number;
|
|
775
|
+
port?: number | string;
|
|
646
776
|
localAddress?: string;
|
|
647
777
|
socketPath?: string;
|
|
648
778
|
method?: string;
|
|
649
779
|
path?: string;
|
|
650
|
-
headers?:
|
|
780
|
+
headers?: OutgoingHttpHeaders;
|
|
651
781
|
auth?: string;
|
|
652
782
|
agent?: Agent | boolean;
|
|
783
|
+
timeout?: number;
|
|
653
784
|
}
|
|
654
785
|
|
|
786
|
+
export type ClientRequestArgs = RequestOptions
|
|
787
|
+
|
|
655
788
|
export interface Server extends net.Server {
|
|
656
789
|
setTimeout(msecs: number, callback: Function): void;
|
|
657
790
|
maxHeadersCount: number;
|
|
@@ -673,8 +806,8 @@ declare module "http" {
|
|
|
673
806
|
write(str: string, encoding?: string, fd?: string): boolean;
|
|
674
807
|
|
|
675
808
|
writeContinue(): void;
|
|
676
|
-
writeHead(statusCode: number, reasonPhrase?: string, headers?:
|
|
677
|
-
writeHead(statusCode: number, headers?:
|
|
809
|
+
writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): void;
|
|
810
|
+
writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void;
|
|
678
811
|
statusCode: number;
|
|
679
812
|
statusMessage: string;
|
|
680
813
|
headersSent: boolean;
|
|
@@ -684,7 +817,7 @@ declare module "http" {
|
|
|
684
817
|
getHeader(name: string): string;
|
|
685
818
|
removeHeader(name: string): void;
|
|
686
819
|
write(chunk: any, encoding?: string): any;
|
|
687
|
-
addTrailers(headers:
|
|
820
|
+
addTrailers(headers: OutgoingHttpHeaders): void;
|
|
688
821
|
finished: boolean;
|
|
689
822
|
|
|
690
823
|
// Extended base methods
|
|
@@ -711,7 +844,7 @@ declare module "http" {
|
|
|
711
844
|
setHeader(name: string, value: string | string[]): void;
|
|
712
845
|
getHeader(name: string): string;
|
|
713
846
|
removeHeader(name: string): void;
|
|
714
|
-
addTrailers(headers:
|
|
847
|
+
addTrailers(headers: OutgoingHttpHeaders): void;
|
|
715
848
|
|
|
716
849
|
// Extended base methods
|
|
717
850
|
end(): void;
|
|
@@ -725,10 +858,10 @@ declare module "http" {
|
|
|
725
858
|
httpVersionMajor: number;
|
|
726
859
|
httpVersionMinor: number;
|
|
727
860
|
connection: net.Socket;
|
|
728
|
-
headers:
|
|
861
|
+
headers: IncomingHttpHeaders;
|
|
729
862
|
rawHeaders: string[];
|
|
730
|
-
trailers:
|
|
731
|
-
rawTrailers:
|
|
863
|
+
trailers: OutgoingHttpHeaders;
|
|
864
|
+
rawTrailers: string[];
|
|
732
865
|
setTimeout(msecs: number, callback: Function): NodeJS.Timer;
|
|
733
866
|
/**
|
|
734
867
|
* Only valid for request obtained from http.Server.
|
|
@@ -833,7 +966,7 @@ declare module "cluster" {
|
|
|
833
966
|
}
|
|
834
967
|
|
|
835
968
|
export class Worker extends events.EventEmitter {
|
|
836
|
-
id:
|
|
969
|
+
id: number;
|
|
837
970
|
process: child.ChildProcess;
|
|
838
971
|
suicide: boolean;
|
|
839
972
|
send(message: any, sendHandle?: any, callback?: (error: Error) => void): boolean;
|
|
@@ -2354,15 +2487,11 @@ declare module "fs" {
|
|
|
2354
2487
|
|
|
2355
2488
|
/**
|
|
2356
2489
|
* Asynchronous rename.
|
|
2357
|
-
* @param oldPath
|
|
2358
|
-
* @param newPath
|
|
2359
2490
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2360
2491
|
*/
|
|
2361
2492
|
export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2362
2493
|
/**
|
|
2363
2494
|
* Synchronous rename
|
|
2364
|
-
* @param oldPath
|
|
2365
|
-
* @param newPath
|
|
2366
2495
|
*/
|
|
2367
2496
|
export function renameSync(oldPath: string, newPath: string): void;
|
|
2368
2497
|
export function truncate(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
@@ -2407,79 +2536,62 @@ declare module "fs" {
|
|
|
2407
2536
|
/**
|
|
2408
2537
|
* Asynchronous unlink - deletes the file specified in {path}
|
|
2409
2538
|
*
|
|
2410
|
-
* @param path
|
|
2411
2539
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2412
2540
|
*/
|
|
2413
2541
|
export function unlink(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2414
2542
|
/**
|
|
2415
2543
|
* Synchronous unlink - deletes the file specified in {path}
|
|
2416
|
-
*
|
|
2417
|
-
* @param path
|
|
2418
2544
|
*/
|
|
2419
2545
|
export function unlinkSync(path: string | Buffer): void;
|
|
2420
2546
|
/**
|
|
2421
2547
|
* Asynchronous rmdir - removes the directory specified in {path}
|
|
2422
2548
|
*
|
|
2423
|
-
* @param path
|
|
2424
2549
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2425
2550
|
*/
|
|
2426
2551
|
export function rmdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2427
2552
|
/**
|
|
2428
2553
|
* Synchronous rmdir - removes the directory specified in {path}
|
|
2429
|
-
*
|
|
2430
|
-
* @param path
|
|
2431
2554
|
*/
|
|
2432
2555
|
export function rmdirSync(path: string | Buffer): void;
|
|
2433
2556
|
/**
|
|
2434
2557
|
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2435
2558
|
*
|
|
2436
|
-
* @param path
|
|
2437
2559
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2438
2560
|
*/
|
|
2439
2561
|
export function mkdir(path: string | Buffer, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2440
2562
|
/**
|
|
2441
2563
|
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2442
2564
|
*
|
|
2443
|
-
* @param path
|
|
2444
|
-
* @param mode
|
|
2445
2565
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2446
2566
|
*/
|
|
2447
2567
|
export function mkdir(path: string | Buffer, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2448
2568
|
/**
|
|
2449
2569
|
* Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2450
2570
|
*
|
|
2451
|
-
* @param path
|
|
2452
|
-
* @param mode
|
|
2453
2571
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2454
2572
|
*/
|
|
2455
2573
|
export function mkdir(path: string | Buffer, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
|
|
2456
2574
|
/**
|
|
2457
2575
|
* Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2458
2576
|
*
|
|
2459
|
-
* @param path
|
|
2460
|
-
* @param mode
|
|
2461
2577
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2462
2578
|
*/
|
|
2463
2579
|
export function mkdirSync(path: string | Buffer, mode?: number): void;
|
|
2464
2580
|
/**
|
|
2465
2581
|
* Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
|
|
2466
2582
|
*
|
|
2467
|
-
* @param path
|
|
2468
|
-
* @param mode
|
|
2469
2583
|
* @param callback No arguments other than a possible exception are given to the completion callback.
|
|
2470
2584
|
*/
|
|
2471
2585
|
export function mkdirSync(path: string | Buffer, mode?: string): void;
|
|
2472
2586
|
/**
|
|
2473
2587
|
* Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
2474
2588
|
*
|
|
2475
|
-
* @param prefix
|
|
2476
2589
|
* @param callback The created folder path is passed as a string to the callback's second parameter.
|
|
2477
2590
|
*/
|
|
2478
2591
|
export function mkdtemp(prefix: string, callback?: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
2479
2592
|
/**
|
|
2480
2593
|
* Synchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
2481
2594
|
*
|
|
2482
|
-
* @param prefix
|
|
2483
2595
|
* @returns Returns the created folder path.
|
|
2484
2596
|
*/
|
|
2485
2597
|
export function mkdtempSync(prefix: string): string;
|
|
@@ -2512,8 +2624,6 @@ declare module "fs" {
|
|
|
2512
2624
|
/**
|
|
2513
2625
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2514
2626
|
*
|
|
2515
|
-
* @param fileName
|
|
2516
|
-
* @param encoding
|
|
2517
2627
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2518
2628
|
*/
|
|
2519
2629
|
export function readFile(filename: string, encoding: null, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
@@ -2522,7 +2632,6 @@ declare module "fs" {
|
|
|
2522
2632
|
/**
|
|
2523
2633
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2524
2634
|
*
|
|
2525
|
-
* @param fileName
|
|
2526
2635
|
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer.
|
|
2527
2636
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2528
2637
|
*/
|
|
@@ -2532,7 +2641,6 @@ declare module "fs" {
|
|
|
2532
2641
|
/**
|
|
2533
2642
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2534
2643
|
*
|
|
2535
|
-
* @param fileName
|
|
2536
2644
|
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer.
|
|
2537
2645
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2538
2646
|
*/
|
|
@@ -2540,15 +2648,11 @@ declare module "fs" {
|
|
|
2540
2648
|
/**
|
|
2541
2649
|
* Asynchronous readFile - Asynchronously reads the entire contents of a file.
|
|
2542
2650
|
*
|
|
2543
|
-
* @param fileName
|
|
2544
2651
|
* @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
|
|
2545
2652
|
*/
|
|
2546
2653
|
export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
2547
2654
|
/**
|
|
2548
2655
|
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
|
2549
|
-
*
|
|
2550
|
-
* @param fileName
|
|
2551
|
-
* @param encoding
|
|
2552
2656
|
*/
|
|
2553
2657
|
export function readFileSync(filename: string, encoding: null): Buffer;
|
|
2554
2658
|
export function readFileSync(filename: string, encoding: string): string;
|
|
@@ -2556,7 +2660,6 @@ declare module "fs" {
|
|
|
2556
2660
|
/**
|
|
2557
2661
|
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
|
2558
2662
|
*
|
|
2559
|
-
* @param fileName
|
|
2560
2663
|
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
|
2561
2664
|
*/
|
|
2562
2665
|
export function readFileSync(filename: string, options: { encoding: null; flag?: string; }): Buffer;
|
|
@@ -2565,7 +2668,6 @@ declare module "fs" {
|
|
|
2565
2668
|
/**
|
|
2566
2669
|
* Synchronous readFile - Synchronously reads the entire contents of a file.
|
|
2567
2670
|
*
|
|
2568
|
-
* @param fileName
|
|
2569
2671
|
* @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
|
|
2570
2672
|
*/
|
|
2571
2673
|
export function readFileSync(filename: string, options?: { flag?: string; }): Buffer;
|
|
@@ -2732,6 +2834,7 @@ declare module "fs" {
|
|
|
2732
2834
|
autoClose?: boolean;
|
|
2733
2835
|
start?: number;
|
|
2734
2836
|
end?: number;
|
|
2837
|
+
highWaterMark?: number;
|
|
2735
2838
|
}): ReadStream;
|
|
2736
2839
|
export function createWriteStream(path: string | Buffer, options?: {
|
|
2737
2840
|
flags?: string;
|
|
@@ -2806,9 +2909,6 @@ declare module "path" {
|
|
|
2806
2909
|
/**
|
|
2807
2910
|
* Solve the relative path from {from} to {to}.
|
|
2808
2911
|
* 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.
|
|
2809
|
-
*
|
|
2810
|
-
* @param from
|
|
2811
|
-
* @param to
|
|
2812
2912
|
*/
|
|
2813
2913
|
export function relative(from: string, to: string): string;
|
|
2814
2914
|
/**
|
|
@@ -3007,7 +3107,7 @@ declare module "tls" {
|
|
|
3007
3107
|
/**
|
|
3008
3108
|
* Returns the bound address, the address family name and port of the underlying socket as reported by
|
|
3009
3109
|
* the operating system.
|
|
3010
|
-
* @returns
|
|
3110
|
+
* @returns An object with three properties, e.g. { port: 12346, family: 'IPv4', address: '127.0.0.1' }.
|
|
3011
3111
|
*/
|
|
3012
3112
|
address(): { port: number; family: string; address: string };
|
|
3013
3113
|
/**
|
|
@@ -3026,8 +3126,8 @@ declare module "tls" {
|
|
|
3026
3126
|
encrypted: boolean;
|
|
3027
3127
|
/**
|
|
3028
3128
|
* Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
|
|
3029
|
-
* @returns
|
|
3030
|
-
*
|
|
3129
|
+
* @returns Returns an object representing the cipher name and the SSL/TLS protocol version of the current
|
|
3130
|
+
* connection.
|
|
3031
3131
|
*/
|
|
3032
3132
|
getCipher(): CipherNameAndProtocol;
|
|
3033
3133
|
/**
|
|
@@ -3036,8 +3136,8 @@ declare module "tls" {
|
|
|
3036
3136
|
* If detailed argument is true the full chain with issuer property will be returned,
|
|
3037
3137
|
* if false only the top certificate without issuer property.
|
|
3038
3138
|
* If the peer does not provide a certificate, it returns null or an empty object.
|
|
3039
|
-
* @param
|
|
3040
|
-
* @returns
|
|
3139
|
+
* @param detailed - If true; the full chain with issuer property will be returned.
|
|
3140
|
+
* @returns An object representing the peer's certificate.
|
|
3041
3141
|
*/
|
|
3042
3142
|
getPeerCertificate(detailed?: boolean): {
|
|
3043
3143
|
subject: Certificate;
|
|
@@ -3051,13 +3151,13 @@ declare module "tls" {
|
|
|
3051
3151
|
};
|
|
3052
3152
|
/**
|
|
3053
3153
|
* Could be used to speed up handshake establishment when reconnecting to the server.
|
|
3054
|
-
* @returns
|
|
3154
|
+
* @returns ASN.1 encoded TLS session or undefined if none was negotiated.
|
|
3055
3155
|
*/
|
|
3056
3156
|
getSession(): any;
|
|
3057
3157
|
/**
|
|
3058
3158
|
* NOTE: Works only with client TLS sockets.
|
|
3059
3159
|
* Useful only for debugging, for session reuse provide session option to tls.connect().
|
|
3060
|
-
* @returns
|
|
3160
|
+
* @returns TLS session ticket or undefined if none was negotiated.
|
|
3061
3161
|
*/
|
|
3062
3162
|
getTLSTicket(): any;
|
|
3063
3163
|
/**
|
|
@@ -3086,9 +3186,9 @@ declare module "tls" {
|
|
|
3086
3186
|
*
|
|
3087
3187
|
* NOTE: Can be used to request peer's certificate after the secure connection has been established.
|
|
3088
3188
|
* ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.
|
|
3089
|
-
* @param
|
|
3189
|
+
* @param options - The options may contain the following fields: rejectUnauthorized,
|
|
3090
3190
|
* requestCert (See tls.createServer() for details).
|
|
3091
|
-
* @param
|
|
3191
|
+
* @param callback - callback(err) will be executed with null as err, once the renegotiation
|
|
3092
3192
|
* is successfully completed.
|
|
3093
3193
|
*/
|
|
3094
3194
|
renegotiate(options: TlsOptions, callback: (err: Error) => any): any;
|
|
@@ -3099,8 +3199,8 @@ declare module "tls" {
|
|
|
3099
3199
|
* large fragments can span multiple roundtrips, and their processing can be delayed due to packet
|
|
3100
3200
|
* loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead,
|
|
3101
3201
|
* which may decrease overall server throughput.
|
|
3102
|
-
* @param
|
|
3103
|
-
* @returns
|
|
3202
|
+
* @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
3203
|
+
* @returns Returns true on success, false otherwise.
|
|
3104
3204
|
*/
|
|
3105
3205
|
setMaxSendFragment(size: number): boolean;
|
|
3106
3206
|
|
node v6/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.94",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
"name": "Thomas Bouldin",
|
|
22
22
|
"url": "https://github.com/inlined",
|
|
23
23
|
"githubUsername": "inlined"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Sebastian Silbermann",
|
|
27
|
+
"url": "https://github.com/eps1lon",
|
|
28
|
+
"githubUsername": "eps1lon"
|
|
24
29
|
}
|
|
25
30
|
],
|
|
26
31
|
"main": "",
|
|
@@ -30,6 +35,6 @@
|
|
|
30
35
|
},
|
|
31
36
|
"scripts": {},
|
|
32
37
|
"dependencies": {},
|
|
33
|
-
"typesPublisherContentHash": "
|
|
38
|
+
"typesPublisherContentHash": "c80387074e4989d88e9b04b94141e7abd8508b13d80c09e531e0cae616c93a90",
|
|
34
39
|
"typeScriptVersion": "2.0"
|
|
35
40
|
}
|