@types/node 8.5.8 → 8.5.9

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 v8/LICENSE CHANGED
File without changes
node v8/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://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v8
9
9
 
10
10
  Additional Details
11
- * Last updated: Mon, 08 Jan 2018 16:04:00 GMT
11
+ * Last updated: Wed, 17 Jan 2018 22:17:28 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
 
node v8/index.d.ts CHANGED
@@ -19,12 +19,6 @@
19
19
  // Alberto Schiabel <https://github.com/jkomyno>
20
20
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
21
21
 
22
- /************************************************
23
- * *
24
- * Node.js v8.5.x API *
25
- * *
26
- ************************************************/
27
-
28
22
  /** inspector module types */
29
23
  /// <reference path="./inspector.d.ts" />
30
24
 
@@ -145,6 +139,7 @@ interface NodeModule {
145
139
  loaded: boolean;
146
140
  parent: NodeModule | null;
147
141
  children: NodeModule[];
142
+ paths: string[];
148
143
  }
149
144
 
150
145
  declare var module: NodeModule;
@@ -1176,13 +1171,7 @@ declare module "cluster" {
1176
1171
  stdio?: any[];
1177
1172
  uid?: number;
1178
1173
  gid?: number;
1179
- }
1180
-
1181
- export interface ClusterSetupMasterSettings {
1182
- exec?: string; // default: process.argv[1]
1183
- args?: string[]; // default: process.argv.slice(2)
1184
- silent?: boolean; // default: false
1185
- stdio?: any[];
1174
+ inspectPort?: number | (() => number);
1186
1175
  }
1187
1176
 
1188
1177
  export interface Address {
@@ -1269,7 +1258,7 @@ declare module "cluster" {
1269
1258
  isWorker: boolean;
1270
1259
  // TODO: cluster.schedulingPolicy
1271
1260
  settings: ClusterSettings;
1272
- setupMaster(settings?: ClusterSetupMasterSettings): void;
1261
+ setupMaster(settings?: ClusterSettings): void;
1273
1262
  worker?: Worker;
1274
1263
  workers?: {
1275
1264
  [index: string]: Worker | undefined
@@ -1346,7 +1335,7 @@ declare module "cluster" {
1346
1335
  export var isWorker: boolean;
1347
1336
  // TODO: cluster.schedulingPolicy
1348
1337
  export var settings: ClusterSettings;
1349
- export function setupMaster(settings?: ClusterSetupMasterSettings): void;
1338
+ export function setupMaster(settings?: ClusterSettings): void;
1350
1339
  export var worker: Worker;
1351
1340
  export var workers: {
1352
1341
  [index: string]: Worker | undefined
@@ -1729,7 +1718,7 @@ declare module "os" {
1729
1718
  export function arch(): string;
1730
1719
  export function platform(): NodeJS.Platform;
1731
1720
  export function tmpdir(): string;
1732
- export var EOL: string;
1721
+ export const EOL: string;
1733
1722
  export function endianness(): "BE" | "LE";
1734
1723
  }
1735
1724
 
@@ -1752,6 +1741,7 @@ declare module "https" {
1752
1741
  rejectUnauthorized?: boolean;
1753
1742
  NPNProtocols?: any;
1754
1743
  SNICallback?: (servername: string, cb: (err: Error | null, ctx: tls.SecureContext) => void) => void;
1744
+ secureProtocol?: string;
1755
1745
  }
1756
1746
 
1757
1747
  export interface RequestOptions extends http.RequestOptions {
@@ -2342,7 +2332,19 @@ declare module "url" {
2342
2332
  query?: string | null | ParsedUrlQuery;
2343
2333
  }
2344
2334
 
2345
- export function parse(urlStr: string, parseQueryString?: boolean, slashesDenoteHost?: boolean): Url;
2335
+ export interface UrlWithParsedQuery extends Url {
2336
+ query: ParsedUrlQuery;
2337
+ }
2338
+
2339
+ export interface UrlWithStringQuery extends Url {
2340
+ query: string | null;
2341
+ }
2342
+
2343
+ export function parse(urlStr: string): UrlWithStringQuery;
2344
+ export function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
2345
+ export function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
2346
+ export function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
2347
+
2346
2348
  export function format(URL: URL, options?: URLFormatOptions): string;
2347
2349
  export function format(urlObject: UrlObject | string): string;
2348
2350
  export function resolve(from: string, to: string): string;
@@ -4573,7 +4575,6 @@ declare module "path" {
4573
4575
  */
4574
4576
  name: string;
4575
4577
  }
4576
-
4577
4578
  export interface FormatInputPathObject {
4578
4579
  /**
4579
4580
  * The root of the path such as '/' or 'c:\'
@@ -4620,7 +4621,7 @@ declare module "path" {
4620
4621
  *
4621
4622
  * @param pathSegments string paths to join. Non-string arguments are ignored.
4622
4623
  */
4623
- export function resolve(...pathSegments: any[]): string;
4624
+ export function resolve(...pathSegments: string[]): string;
4624
4625
  /**
4625
4626
  * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
4626
4627
  *
@@ -4686,7 +4687,7 @@ declare module "path" {
4686
4687
  export var sep: string;
4687
4688
  export var delimiter: string;
4688
4689
  export function parse(p: string): ParsedPath;
4689
- export function format(pP: ParsedPath): string;
4690
+ export function format(pP: FormatInputPathObject): string;
4690
4691
  }
4691
4692
 
4692
4693
  export module win32 {
@@ -4701,7 +4702,7 @@ declare module "path" {
4701
4702
  export var sep: string;
4702
4703
  export var delimiter: string;
4703
4704
  export function parse(p: string): ParsedPath;
4704
- export function format(pP: ParsedPath): string;
4705
+ export function format(pP: FormatInputPathObject): string;
4705
4706
  }
4706
4707
  }
4707
4708
 
@@ -6920,195 +6921,195 @@ declare module "http2" {
6920
6921
  }
6921
6922
 
6922
6923
  declare module "perf_hooks" {
6923
- export interface PerformanceEntry {
6924
- /**
6925
- * The total number of milliseconds elapsed for this entry.
6926
- * This value will not be meaningful for all Performance Entry types.
6927
- */
6928
- readonly duration: number;
6929
-
6930
- /**
6931
- * The name of the performance entry.
6932
- */
6933
- readonly name: string;
6934
-
6935
- /**
6936
- * The high resolution millisecond timestamp marking the starting time of the Performance Entry.
6937
- */
6938
- readonly startTime: number;
6939
-
6940
- /**
6941
- * The type of the performance entry.
6942
- * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'.
6943
- */
6944
- readonly entryType: string;
6945
-
6946
- /**
6947
- * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies
6948
- * the type of garbage collection operation that occurred.
6949
- * The value may be one of perf_hooks.constants.
6950
- */
6951
- readonly kind?: number;
6952
- }
6953
-
6954
- export interface PerformanceNodeTiming extends PerformanceEntry {
6955
- /**
6956
- * The high resolution millisecond timestamp at which the Node.js process completed bootstrap.
6957
- */
6958
- readonly bootstrapComplete: number;
6959
-
6960
- /**
6961
- * The high resolution millisecond timestamp at which cluster processing ended.
6962
- */
6963
- readonly clusterSetupEnd: number;
6964
-
6965
- /**
6966
- * The high resolution millisecond timestamp at which cluster processing started.
6967
- */
6968
- readonly clusterSetupStart: number;
6969
-
6970
- /**
6971
- * The high resolution millisecond timestamp at which the Node.js event loop exited.
6972
- */
6973
- readonly loopExit: number;
6974
-
6975
- /**
6976
- * The high resolution millisecond timestamp at which the Node.js event loop started.
6977
- */
6978
- readonly loopStart: number;
6979
-
6980
- /**
6981
- * The high resolution millisecond timestamp at which main module load ended.
6982
- */
6983
- readonly moduleLoadEnd: number;
6984
-
6985
- /**
6986
- * The high resolution millisecond timestamp at which main module load started.
6987
- */
6988
- readonly moduleLoadStart: number;
6989
-
6990
- /**
6991
- * The high resolution millisecond timestamp at which the Node.js process was initialized.
6992
- */
6993
- readonly nodeStart: number;
6994
-
6995
- /**
6996
- * The high resolution millisecond timestamp at which preload module load ended.
6997
- */
6998
- readonly preloadModuleLoadEnd: number;
6999
-
7000
- /**
7001
- * The high resolution millisecond timestamp at which preload module load started.
7002
- */
7003
- readonly preloadModuleLoadStart: number;
7004
-
7005
- /**
7006
- * The high resolution millisecond timestamp at which third_party_main processing ended.
7007
- */
7008
- readonly thirdPartyMainEnd: number;
7009
-
7010
- /**
7011
- * The high resolution millisecond timestamp at which third_party_main processing started.
7012
- */
7013
- readonly thirdPartyMainStart: number;
7014
-
7015
- /**
7016
- * The high resolution millisecond timestamp at which the V8 platform was initialized.
7017
- */
7018
- readonly v8Start: number;
7019
- }
7020
-
7021
- export interface Performance {
7022
- /**
7023
- * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline.
7024
- * If name is provided, removes entries with name.
7025
- * @param name
7026
- */
7027
- clearFunctions(name?: string): void;
7028
-
7029
- /**
7030
- * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
7031
- * If name is provided, removes only the named mark.
7032
- * @param name
7033
- */
7034
- clearMarks(name?: string): void;
7035
-
7036
- /**
7037
- * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
7038
- * If name is provided, removes only objects whose performanceEntry.name matches name.
7039
- */
7040
- clearMeasures(name?: string): void;
7041
-
7042
- /**
7043
- * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
7044
- * @return list of all PerformanceEntry objects
7045
- */
7046
- getEntries(): PerformanceEntry[];
7047
-
7048
- /**
7049
- * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
7050
- * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
7051
- * @param name
7052
- * @param type
7053
- * @return list of all PerformanceEntry objects
7054
- */
7055
- getEntriesByName(name: string, type?: string): PerformanceEntry[];
7056
-
7057
- /**
7058
- * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
7059
- * whose performanceEntry.entryType is equal to type.
7060
- * @param type
7061
- * @return list of all PerformanceEntry objects
7062
- */
7063
- getEntriesByType(type: string): PerformanceEntry[];
7064
-
7065
- /**
7066
- * Creates a new PerformanceMark entry in the Performance Timeline.
7067
- * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
7068
- * and whose performanceEntry.duration is always 0.
7069
- * Performance marks are used to mark specific significant moments in the Performance Timeline.
7070
- * @param name
7071
- */
7072
- mark(name?: string): void;
7073
-
7074
- /**
7075
- * Creates a new PerformanceMeasure entry in the Performance Timeline.
7076
- * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
7077
- * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
7078
- *
7079
- * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
7080
- * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
7081
- * then startMark is set to timeOrigin by default.
7082
- *
7083
- * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
7084
- * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
7085
- * @param name
7086
- * @param startMark
7087
- * @param endMark
7088
- */
7089
- measure(name: string, startMark: string, endMark: string): void;
7090
-
7091
- /**
7092
- * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
7093
- */
7094
- readonly nodeTiming: PerformanceNodeTiming;
7095
-
7096
- /**
7097
- * @return the current high resolution millisecond timestamp
7098
- */
7099
- now(): number;
7100
-
7101
- /**
7102
- * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
7103
- */
7104
- readonly timeOrigin: number;
7105
-
7106
- /**
7107
- * Wraps a function within a new function that measures the running time of the wrapped function.
7108
- * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
7109
- * @param fn
7110
- */
7111
- timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
6924
+ export interface PerformanceEntry {
6925
+ /**
6926
+ * The total number of milliseconds elapsed for this entry.
6927
+ * This value will not be meaningful for all Performance Entry types.
6928
+ */
6929
+ readonly duration: number;
6930
+
6931
+ /**
6932
+ * The name of the performance entry.
6933
+ */
6934
+ readonly name: string;
6935
+
6936
+ /**
6937
+ * The high resolution millisecond timestamp marking the starting time of the Performance Entry.
6938
+ */
6939
+ readonly startTime: number;
6940
+
6941
+ /**
6942
+ * The type of the performance entry.
6943
+ * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'.
6944
+ */
6945
+ readonly entryType: string;
6946
+
6947
+ /**
6948
+ * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies
6949
+ * the type of garbage collection operation that occurred.
6950
+ * The value may be one of perf_hooks.constants.
6951
+ */
6952
+ readonly kind?: number;
6953
+ }
6954
+
6955
+ export interface PerformanceNodeTiming extends PerformanceEntry {
6956
+ /**
6957
+ * The high resolution millisecond timestamp at which the Node.js process completed bootstrap.
6958
+ */
6959
+ readonly bootstrapComplete: number;
6960
+
6961
+ /**
6962
+ * The high resolution millisecond timestamp at which cluster processing ended.
6963
+ */
6964
+ readonly clusterSetupEnd: number;
6965
+
6966
+ /**
6967
+ * The high resolution millisecond timestamp at which cluster processing started.
6968
+ */
6969
+ readonly clusterSetupStart: number;
6970
+
6971
+ /**
6972
+ * The high resolution millisecond timestamp at which the Node.js event loop exited.
6973
+ */
6974
+ readonly loopExit: number;
6975
+
6976
+ /**
6977
+ * The high resolution millisecond timestamp at which the Node.js event loop started.
6978
+ */
6979
+ readonly loopStart: number;
6980
+
6981
+ /**
6982
+ * The high resolution millisecond timestamp at which main module load ended.
6983
+ */
6984
+ readonly moduleLoadEnd: number;
6985
+
6986
+ /**
6987
+ * The high resolution millisecond timestamp at which main module load started.
6988
+ */
6989
+ readonly moduleLoadStart: number;
6990
+
6991
+ /**
6992
+ * The high resolution millisecond timestamp at which the Node.js process was initialized.
6993
+ */
6994
+ readonly nodeStart: number;
6995
+
6996
+ /**
6997
+ * The high resolution millisecond timestamp at which preload module load ended.
6998
+ */
6999
+ readonly preloadModuleLoadEnd: number;
7000
+
7001
+ /**
7002
+ * The high resolution millisecond timestamp at which preload module load started.
7003
+ */
7004
+ readonly preloadModuleLoadStart: number;
7005
+
7006
+ /**
7007
+ * The high resolution millisecond timestamp at which third_party_main processing ended.
7008
+ */
7009
+ readonly thirdPartyMainEnd: number;
7010
+
7011
+ /**
7012
+ * The high resolution millisecond timestamp at which third_party_main processing started.
7013
+ */
7014
+ readonly thirdPartyMainStart: number;
7015
+
7016
+ /**
7017
+ * The high resolution millisecond timestamp at which the V8 platform was initialized.
7018
+ */
7019
+ readonly v8Start: number;
7020
+ }
7021
+
7022
+ export interface Performance {
7023
+ /**
7024
+ * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline.
7025
+ * If name is provided, removes entries with name.
7026
+ * @param name
7027
+ */
7028
+ clearFunctions(name?: string): void;
7029
+
7030
+ /**
7031
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
7032
+ * If name is provided, removes only the named mark.
7033
+ * @param name
7034
+ */
7035
+ clearMarks(name?: string): void;
7036
+
7037
+ /**
7038
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
7039
+ * If name is provided, removes only objects whose performanceEntry.name matches name.
7040
+ */
7041
+ clearMeasures(name?: string): void;
7042
+
7043
+ /**
7044
+ * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
7045
+ * @return list of all PerformanceEntry objects
7046
+ */
7047
+ getEntries(): PerformanceEntry[];
7048
+
7049
+ /**
7050
+ * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
7051
+ * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
7052
+ * @param name
7053
+ * @param type
7054
+ * @return list of all PerformanceEntry objects
7055
+ */
7056
+ getEntriesByName(name: string, type?: string): PerformanceEntry[];
7057
+
7058
+ /**
7059
+ * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
7060
+ * whose performanceEntry.entryType is equal to type.
7061
+ * @param type
7062
+ * @return list of all PerformanceEntry objects
7063
+ */
7064
+ getEntriesByType(type: string): PerformanceEntry[];
7065
+
7066
+ /**
7067
+ * Creates a new PerformanceMark entry in the Performance Timeline.
7068
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
7069
+ * and whose performanceEntry.duration is always 0.
7070
+ * Performance marks are used to mark specific significant moments in the Performance Timeline.
7071
+ * @param name
7072
+ */
7073
+ mark(name?: string): void;
7074
+
7075
+ /**
7076
+ * Creates a new PerformanceMeasure entry in the Performance Timeline.
7077
+ * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
7078
+ * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
7079
+ *
7080
+ * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
7081
+ * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
7082
+ * then startMark is set to timeOrigin by default.
7083
+ *
7084
+ * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
7085
+ * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
7086
+ * @param name
7087
+ * @param startMark
7088
+ * @param endMark
7089
+ */
7090
+ measure(name: string, startMark: string, endMark: string): void;
7091
+
7092
+ /**
7093
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
7094
+ */
7095
+ readonly nodeTiming: PerformanceNodeTiming;
7096
+
7097
+ /**
7098
+ * @return the current high resolution millisecond timestamp
7099
+ */
7100
+ now(): number;
7101
+
7102
+ /**
7103
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
7104
+ */
7105
+ readonly timeOrigin: number;
7106
+
7107
+ /**
7108
+ * Wraps a function within a new function that measures the running time of the wrapped function.
7109
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
7110
+ * @param fn
7111
+ */
7112
+ timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
7112
7113
  }
7113
7114
 
7114
7115
  export interface PerformanceObserverEntryList {
@@ -7156,5 +7157,5 @@ declare module "perf_hooks" {
7156
7157
  export const NODE_PERFORMANCE_GC_WEAKCB: number;
7157
7158
  }
7158
7159
 
7159
- const performance: Performance;
7160
+ const performance: Performance;
7160
7161
  }
node v8/inspector.d.ts CHANGED
File without changes
node v8/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "8.5.8",
3
+ "version": "8.5.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -95,6 +95,6 @@
95
95
  },
96
96
  "scripts": {},
97
97
  "dependencies": {},
98
- "typesPublisherContentHash": "b30869fee6aefe6c92a5bc1f2de2aeab6516c4d53c3fc14ffaeb6a4fcbd3f47d",
98
+ "typesPublisherContentHash": "6609190e866fb6835d0ff0ca871ebad022c9b8dfe3bccc8bccd1fca32ae7ab7e",
99
99
  "typeScriptVersion": "2.0"
100
100
  }