` tag red
57 | ```
58 | p {
59 | color: red;
60 | }
61 | ```
62 | ---
63 |
64 | *Id selector* - Make an element with an id `my-id` blue
65 | ```
66 | #my-id {
67 | color: blue;
68 | }
69 | ```
70 | ---
71 |
72 | *Class selector* - Make an element with class 'my-class' yellow
73 | ```
74 | .my-class {
75 | color: yellow;
76 | }
77 | ```
78 | ---
79 | * Step 4 - Deploy
80 |
81 | Deploying Vanilla CSS in your next HTML project is as simple as placing a link element in the head of your HTML document.
82 |
83 | ### Example
84 | ```
85 |
86 |
87 |
88 | ```
89 | Just save your HTML document, open it in your favorite web browser, and see the delicious results!
90 |
91 |
92 | ### Testimonials
93 | > Native support for HTML5 and other cutting-edge technologies makes me keep coming back to Vanilla CSS, time after time.
94 |
95 | > Works great in all browsers, other than IE8 which can get a bit tricky, this framework has saved my life time after time.
96 |
97 | ### Further Reading
98 | * https://en.wikipedia.org/wiki/Cascading_Style_Sheets
99 | * https://developer.mozilla.org/en-US/docs/Web/CSS
100 | * http://www.w3schools.com/cssref/css_selectors.asp
101 |
102 | ## Contribute
103 | Please report any bugs or submit feature requests to [Vanilla-CSS github issue tracker](https://github.com/aethant/vanilla-css/issues)
104 |
105 | ## Meet the Team
106 |
107 | **Alex (aka aethant)**
108 | *Scrum Master*
109 |
110 |
111 | **Carl Winkler (aka seikho)**
112 | *Lead Developer*
113 |
114 |
115 | **Justin Maat (aka jxm262)**
116 | *Lead Documentation Maintainer/Devops*
117 |
118 |
119 | **Tony Phillips (aka neutraltone)**
120 | *Developer / Lead Translator of UK to US english*
121 |
122 |
123 | **JD Flynn (aka dorf)**
124 | *Project Evangelist / SEO Specialist*
125 |
126 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Vanilla CSS
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
66 |
67 |
68 |
69 |
70 |
71 |
74 |
76 |
77 |
80 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/src/typings/mocha/mocha.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for mocha 2.2.5
2 | // Project: http://mochajs.org/
3 | // Definitions by: Kazi Manzur Rashid , otiai10 , jt000 , Vadim Macagon
4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
5 |
6 | interface MochaSetupOptions {
7 | //milliseconds to wait before considering a test slow
8 | slow?: number;
9 |
10 | // timeout in milliseconds
11 | timeout?: number;
12 |
13 | // ui name "bdd", "tdd", "exports" etc
14 | ui?: string;
15 |
16 | //array of accepted globals
17 | globals?: any[];
18 |
19 | // reporter instance (function or string), defaults to `mocha.reporters.Spec`
20 | reporter?: any;
21 |
22 | // bail on the first test failure
23 | bail?: boolean;
24 |
25 | // ignore global leaks
26 | ignoreLeaks?: boolean;
27 |
28 | // grep string or regexp to filter tests with
29 | grep?: any;
30 | }
31 |
32 | interface MochaDone {
33 | (error?: Error): void;
34 | }
35 |
36 | declare var mocha: Mocha;
37 | declare var describe: Mocha.IContextDefinition;
38 | declare var xdescribe: Mocha.IContextDefinition;
39 | // alias for `describe`
40 | declare var context: Mocha.IContextDefinition;
41 | // alias for `describe`
42 | declare var suite: Mocha.IContextDefinition;
43 | declare var it: Mocha.ITestDefinition;
44 | declare var xit: Mocha.ITestDefinition;
45 | // alias for `it`
46 | declare var test: Mocha.ITestDefinition;
47 |
48 | declare function before(action: () => void): void;
49 |
50 | declare function before(action: (done: MochaDone) => void): void;
51 |
52 | declare function before(description: string, action: () => void): void;
53 |
54 | declare function before(description: string, action: (done: MochaDone) => void): void;
55 |
56 | declare function setup(action: () => void): void;
57 |
58 | declare function setup(action: (done: MochaDone) => void): void;
59 |
60 | declare function after(action: () => void): void;
61 |
62 | declare function after(action: (done: MochaDone) => void): void;
63 |
64 | declare function after(description: string, action: () => void): void;
65 |
66 | declare function after(description: string, action: (done: MochaDone) => void): void;
67 |
68 | declare function teardown(action: () => void): void;
69 |
70 | declare function teardown(action: (done: MochaDone) => void): void;
71 |
72 | declare function beforeEach(action: () => void): void;
73 |
74 | declare function beforeEach(action: (done: MochaDone) => void): void;
75 |
76 | declare function beforeEach(description: string, action: () => void): void;
77 |
78 | declare function beforeEach(description: string, action: (done: MochaDone) => void): void;
79 |
80 | declare function suiteSetup(action: () => void): void;
81 |
82 | declare function suiteSetup(action: (done: MochaDone) => void): void;
83 |
84 | declare function afterEach(action: () => void): void;
85 |
86 | declare function afterEach(action: (done: MochaDone) => void): void;
87 |
88 | declare function afterEach(description: string, action: () => void): void;
89 |
90 | declare function afterEach(description: string, action: (done: MochaDone) => void): void;
91 |
92 | declare function suiteTeardown(action: () => void): void;
93 |
94 | declare function suiteTeardown(action: (done: MochaDone) => void): void;
95 |
96 | declare class Mocha {
97 | constructor(options?: {
98 | grep?: RegExp;
99 | ui?: string;
100 | reporter?: string;
101 | timeout?: number;
102 | bail?: boolean;
103 | });
104 |
105 | /** Setup mocha with the given options. */
106 | setup(options: MochaSetupOptions): Mocha;
107 | bail(value?: boolean): Mocha;
108 | addFile(file: string): Mocha;
109 | /** Sets reporter by name, defaults to "spec". */
110 | reporter(name: string): Mocha;
111 | /** Sets reporter constructor, defaults to mocha.reporters.Spec. */
112 | reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha;
113 | ui(value: string): Mocha;
114 | grep(value: string): Mocha;
115 | grep(value: RegExp): Mocha;
116 | invert(): Mocha;
117 | ignoreLeaks(value: boolean): Mocha;
118 | checkLeaks(): Mocha;
119 | /**
120 | * Function to allow assertion libraries to throw errors directly into mocha.
121 | * This is useful when running tests in a browser because window.onerror will
122 | * only receive the 'message' attribute of the Error.
123 | */
124 | throwError(error: Error): void;
125 | /** Enables growl support. */
126 | growl(): Mocha;
127 | globals(value: string): Mocha;
128 | globals(values: string[]): Mocha;
129 | useColors(value: boolean): Mocha;
130 | useInlineDiffs(value: boolean): Mocha;
131 | timeout(value: number): Mocha;
132 | slow(value: number): Mocha;
133 | enableTimeouts(value: boolean): Mocha;
134 | asyncOnly(value: boolean): Mocha;
135 | noHighlighting(value: boolean): Mocha;
136 | /** Runs tests and invokes `onComplete()` when finished. */
137 | run(onComplete?: (failures: number) => void): Mocha.IRunner;
138 | }
139 |
140 | // merge the Mocha class declaration with a module
141 | declare module Mocha {
142 | /** Partial interface for Mocha's `Runnable` class. */
143 | interface IRunnable {
144 | title: string;
145 | fn: Function;
146 | async: boolean;
147 | sync: boolean;
148 | timedOut: boolean;
149 | }
150 |
151 | /** Partial interface for Mocha's `Suite` class. */
152 | interface ISuite {
153 | parent: ISuite;
154 | title: string;
155 |
156 | fullTitle(): string;
157 | }
158 |
159 | /** Partial interface for Mocha's `Test` class. */
160 | interface ITest extends IRunnable {
161 | parent: ISuite;
162 | pending: boolean;
163 |
164 | fullTitle(): string;
165 | }
166 |
167 | /** Partial interface for Mocha's `Runner` class. */
168 | interface IRunner {}
169 |
170 | interface IContextDefinition {
171 | (description: string, spec: () => void): ISuite;
172 | only(description: string, spec: () => void): ISuite;
173 | skip(description: string, spec: () => void): void;
174 | timeout(ms: number): void;
175 | }
176 |
177 | interface ITestDefinition {
178 | (expectation: string, assertion?: () => void): ITest;
179 | (expectation: string, assertion?: (done: MochaDone) => void): ITest;
180 | only(expectation: string, assertion?: () => void): ITest;
181 | only(expectation: string, assertion?: (done: MochaDone) => void): ITest;
182 | skip(expectation: string, assertion?: () => void): void;
183 | skip(expectation: string, assertion?: (done: MochaDone) => void): void;
184 | timeout(ms: number): void;
185 | }
186 |
187 | export module reporters {
188 | export class Base {
189 | stats: {
190 | suites: number;
191 | tests: number;
192 | passes: number;
193 | pending: number;
194 | failures: number;
195 | };
196 |
197 | constructor(runner: IRunner);
198 | }
199 |
200 | export class Doc extends Base {}
201 | export class Dot extends Base {}
202 | export class HTML extends Base {}
203 | export class HTMLCov extends Base {}
204 | export class JSON extends Base {}
205 | export class JSONCov extends Base {}
206 | export class JSONStream extends Base {}
207 | export class Landing extends Base {}
208 | export class List extends Base {}
209 | export class Markdown extends Base {}
210 | export class Min extends Base {}
211 | export class Nyan extends Base {}
212 | export class Progress extends Base {
213 | /**
214 | * @param options.open String used to indicate the start of the progress bar.
215 | * @param options.complete String used to indicate a complete test on the progress bar.
216 | * @param options.incomplete String used to indicate an incomplete test on the progress bar.
217 | * @param options.close String used to indicate the end of the progress bar.
218 | */
219 | constructor(runner: IRunner, options?: {
220 | open?: string;
221 | complete?: string;
222 | incomplete?: string;
223 | close?: string;
224 | });
225 | }
226 | export class Spec extends Base {}
227 | export class TAP extends Base {}
228 | export class XUnit extends Base {
229 | constructor(runner: IRunner, options?: any);
230 | }
231 | }
232 | }
233 |
234 | declare module "mocha" {
235 | export = Mocha;
236 | }
237 |
--------------------------------------------------------------------------------
/src/typings/chai/chai.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for chai 3.2.0
2 | // Project: http://chaijs.com/
3 | // Definitions by: Jed Mao ,
4 | // Bart van der Schoor ,
5 | // Andrew Brown ,
6 | // Olivier Chevet
7 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
8 |
9 | //
10 |
11 | declare module Chai {
12 |
13 | interface ChaiStatic {
14 | expect: ExpectStatic;
15 | should(): Should;
16 | /**
17 | * Provides a way to extend the internals of Chai
18 | */
19 | use(fn: (chai: any, utils: any) => void): any;
20 | assert: AssertStatic;
21 | config: Config;
22 | AssertionError: AssertionError;
23 | }
24 |
25 | export interface ExpectStatic extends AssertionStatic {
26 | fail(actual?: any, expected?: any, message?: string, operator?: string): void;
27 | }
28 |
29 | export interface AssertStatic extends Assert {
30 | }
31 |
32 | export interface AssertionStatic {
33 | (target: any, message?: string): Assertion;
34 | }
35 |
36 | interface ShouldAssertion {
37 | equal(value1: any, value2: any, message?: string): void;
38 | Throw: ShouldThrow;
39 | throw: ShouldThrow;
40 | exist(value: any, message?: string): void;
41 | }
42 |
43 | interface Should extends ShouldAssertion {
44 | not: ShouldAssertion;
45 | fail(actual: any, expected: any, message?: string, operator?: string): void;
46 | }
47 |
48 | interface ShouldThrow {
49 | (actual: Function): void;
50 | (actual: Function, expected: string|RegExp, message?: string): void;
51 | (actual: Function, constructor: Error|Function, expected?: string|RegExp, message?: string): void;
52 | }
53 |
54 | interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
55 | not: Assertion;
56 | deep: Deep;
57 | any: KeyFilter;
58 | all: KeyFilter;
59 | a: TypeComparison;
60 | an: TypeComparison;
61 | include: Include;
62 | includes: Include;
63 | contain: Include;
64 | contains: Include;
65 | ok: Assertion;
66 | true: Assertion;
67 | false: Assertion;
68 | null: Assertion;
69 | undefined: Assertion;
70 | NaN: Assertion;
71 | exist: Assertion;
72 | empty: Assertion;
73 | arguments: Assertion;
74 | Arguments: Assertion;
75 | equal: Equal;
76 | equals: Equal;
77 | eq: Equal;
78 | eql: Equal;
79 | eqls: Equal;
80 | property: Property;
81 | ownProperty: OwnProperty;
82 | haveOwnProperty: OwnProperty;
83 | ownPropertyDescriptor: OwnPropertyDescriptor;
84 | haveOwnPropertyDescriptor: OwnPropertyDescriptor;
85 | length: Length;
86 | lengthOf: Length;
87 | match: Match;
88 | matches: Match;
89 | string(string: string, message?: string): Assertion;
90 | keys: Keys;
91 | key(string: string): Assertion;
92 | throw: Throw;
93 | throws: Throw;
94 | Throw: Throw;
95 | respondTo: RespondTo;
96 | respondsTo: RespondTo;
97 | itself: Assertion;
98 | satisfy: Satisfy;
99 | satisfies: Satisfy;
100 | closeTo(expected: number, delta: number, message?: string): Assertion;
101 | members: Members;
102 | increase: PropertyChange;
103 | increases: PropertyChange;
104 | decrease: PropertyChange;
105 | decreases: PropertyChange;
106 | change: PropertyChange;
107 | changes: PropertyChange;
108 | extensible: Assertion;
109 | sealed: Assertion;
110 | frozen: Assertion;
111 |
112 | }
113 |
114 | interface LanguageChains {
115 | to: Assertion;
116 | be: Assertion;
117 | been: Assertion;
118 | is: Assertion;
119 | that: Assertion;
120 | which: Assertion;
121 | and: Assertion;
122 | has: Assertion;
123 | have: Assertion;
124 | with: Assertion;
125 | at: Assertion;
126 | of: Assertion;
127 | same: Assertion;
128 | }
129 |
130 | interface NumericComparison {
131 | above: NumberComparer;
132 | gt: NumberComparer;
133 | greaterThan: NumberComparer;
134 | least: NumberComparer;
135 | gte: NumberComparer;
136 | below: NumberComparer;
137 | lt: NumberComparer;
138 | lessThan: NumberComparer;
139 | most: NumberComparer;
140 | lte: NumberComparer;
141 | within(start: number, finish: number, message?: string): Assertion;
142 | }
143 |
144 | interface NumberComparer {
145 | (value: number, message?: string): Assertion;
146 | }
147 |
148 | interface TypeComparison {
149 | (type: string, message?: string): Assertion;
150 | instanceof: InstanceOf;
151 | instanceOf: InstanceOf;
152 | }
153 |
154 | interface InstanceOf {
155 | (constructor: Object, message?: string): Assertion;
156 | }
157 |
158 | interface Deep {
159 | equal: Equal;
160 | include: Include;
161 | property: Property;
162 | members: Members;
163 | }
164 |
165 | interface KeyFilter {
166 | keys: Keys;
167 | }
168 |
169 | interface Equal {
170 | (value: any, message?: string): Assertion;
171 | }
172 |
173 | interface Property {
174 | (name: string, value?: any, message?: string): Assertion;
175 | }
176 |
177 | interface OwnProperty {
178 | (name: string, message?: string): Assertion;
179 | }
180 |
181 | interface OwnPropertyDescriptor {
182 | (name: string, descriptor: PropertyDescriptor, message?: string): Assertion;
183 | (name: string, message?: string): Assertion;
184 | }
185 |
186 | interface Length extends LanguageChains, NumericComparison {
187 | (length: number, message?: string): Assertion;
188 | }
189 |
190 | interface Include {
191 | (value: Object, message?: string): Assertion;
192 | (value: string, message?: string): Assertion;
193 | (value: number, message?: string): Assertion;
194 | keys: Keys;
195 | members: Members;
196 | any: KeyFilter;
197 | all: KeyFilter;
198 | }
199 |
200 | interface Match {
201 | (regexp: RegExp|string, message?: string): Assertion;
202 | }
203 |
204 | interface Keys {
205 | (...keys: string[]): Assertion;
206 | (keys: any[]): Assertion;
207 | (keys: Object): Assertion;
208 | }
209 |
210 | interface Throw {
211 | (): Assertion;
212 | (expected: string, message?: string): Assertion;
213 | (expected: RegExp, message?: string): Assertion;
214 | (constructor: Error, expected?: string, message?: string): Assertion;
215 | (constructor: Error, expected?: RegExp, message?: string): Assertion;
216 | (constructor: Function, expected?: string, message?: string): Assertion;
217 | (constructor: Function, expected?: RegExp, message?: string): Assertion;
218 | }
219 |
220 | interface RespondTo {
221 | (method: string, message?: string): Assertion;
222 | }
223 |
224 | interface Satisfy {
225 | (matcher: Function, message?: string): Assertion;
226 | }
227 |
228 | interface Members {
229 | (set: any[], message?: string): Assertion;
230 | }
231 |
232 | interface PropertyChange {
233 | (object: Object, prop: string, msg?: string): Assertion;
234 | }
235 |
236 | export interface Assert {
237 | /**
238 | * @param expression Expression to test for truthiness.
239 | * @param message Message to display on error.
240 | */
241 | (expression: any, message?: string): void;
242 |
243 | fail(actual?: any, expected?: any, msg?: string, operator?: string): void;
244 |
245 | ok(val: any, msg?: string): void;
246 | isOk(val: any, msg?: string): void;
247 | notOk(val: any, msg?: string): void;
248 | isNotOk(val: any, msg?: string): void;
249 |
250 | equal(act: any, exp: any, msg?: string): void;
251 | notEqual(act: any, exp: any, msg?: string): void;
252 |
253 | strictEqual(act: any, exp: any, msg?: string): void;
254 | notStrictEqual(act: any, exp: any, msg?: string): void;
255 |
256 | deepEqual(act: any, exp: any, msg?: string): void;
257 | notDeepEqual(act: any, exp: any, msg?: string): void;
258 |
259 | isTrue(val: any, msg?: string): void;
260 | isFalse(val: any, msg?: string): void;
261 |
262 | isNull(val: any, msg?: string): void;
263 | isNotNull(val: any, msg?: string): void;
264 |
265 | isUndefined(val: any, msg?: string): void;
266 | isDefined(val: any, msg?: string): void;
267 |
268 | isNaN(val: any, msg?: string): void;
269 | isNotNaN(val: any, msg?: string): void;
270 |
271 | isAbove(val: number, abv: number, msg?: string): void;
272 | isBelow(val: number, blw: number, msg?: string): void;
273 |
274 | isFunction(val: any, msg?: string): void;
275 | isNotFunction(val: any, msg?: string): void;
276 |
277 | isObject(val: any, msg?: string): void;
278 | isNotObject(val: any, msg?: string): void;
279 |
280 | isArray(val: any, msg?: string): void;
281 | isNotArray(val: any, msg?: string): void;
282 |
283 | isString(val: any, msg?: string): void;
284 | isNotString(val: any, msg?: string): void;
285 |
286 | isNumber(val: any, msg?: string): void;
287 | isNotNumber(val: any, msg?: string): void;
288 |
289 | isBoolean(val: any, msg?: string): void;
290 | isNotBoolean(val: any, msg?: string): void;
291 |
292 | typeOf(val: any, type: string, msg?: string): void;
293 | notTypeOf(val: any, type: string, msg?: string): void;
294 |
295 | instanceOf(val: any, type: Function, msg?: string): void;
296 | notInstanceOf(val: any, type: Function, msg?: string): void;
297 |
298 | include(exp: string, inc: any, msg?: string): void;
299 | include(exp: any[], inc: any, msg?: string): void;
300 |
301 | notInclude(exp: string, inc: any, msg?: string): void;
302 | notInclude(exp: any[], inc: any, msg?: string): void;
303 |
304 | match(exp: any, re: RegExp, msg?: string): void;
305 | notMatch(exp: any, re: RegExp, msg?: string): void;
306 |
307 | property(obj: Object, prop: string, msg?: string): void;
308 | notProperty(obj: Object, prop: string, msg?: string): void;
309 | deepProperty(obj: Object, prop: string, msg?: string): void;
310 | notDeepProperty(obj: Object, prop: string, msg?: string): void;
311 |
312 | propertyVal(obj: Object, prop: string, val: any, msg?: string): void;
313 | propertyNotVal(obj: Object, prop: string, val: any, msg?: string): void;
314 |
315 | deepPropertyVal(obj: Object, prop: string, val: any, msg?: string): void;
316 | deepPropertyNotVal(obj: Object, prop: string, val: any, msg?: string): void;
317 |
318 | lengthOf(exp: any, len: number, msg?: string): void;
319 | //alias frenzy
320 | throw(fn: Function, msg?: string): void;
321 | throw(fn: Function, regExp: RegExp): void;
322 | throw(fn: Function, errType: Function, msg?: string): void;
323 | throw(fn: Function, errType: Function, regExp: RegExp): void;
324 |
325 | throws(fn: Function, msg?: string): void;
326 | throws(fn: Function, regExp: RegExp): void;
327 | throws(fn: Function, errType: Function, msg?: string): void;
328 | throws(fn: Function, errType: Function, regExp: RegExp): void;
329 |
330 | Throw(fn: Function, msg?: string): void;
331 | Throw(fn: Function, regExp: RegExp): void;
332 | Throw(fn: Function, errType: Function, msg?: string): void;
333 | Throw(fn: Function, errType: Function, regExp: RegExp): void;
334 |
335 | doesNotThrow(fn: Function, msg?: string): void;
336 | doesNotThrow(fn: Function, regExp: RegExp): void;
337 | doesNotThrow(fn: Function, errType: Function, msg?: string): void;
338 | doesNotThrow(fn: Function, errType: Function, regExp: RegExp): void;
339 |
340 | operator(val: any, operator: string, val2: any, msg?: string): void;
341 | closeTo(act: number, exp: number, delta: number, msg?: string): void;
342 |
343 | sameMembers(set1: any[], set2: any[], msg?: string): void;
344 | sameDeepMembers(set1: any[], set2: any[], msg?: string): void;
345 | includeMembers(superset: any[], subset: any[], msg?: string): void;
346 |
347 | ifError(val: any, msg?: string): void;
348 |
349 | isExtensible(obj: {}, msg?: string): void;
350 | extensible(obj: {}, msg?: string): void;
351 | isNotExtensible(obj: {}, msg?: string): void;
352 | notExtensible(obj: {}, msg?: string): void;
353 |
354 | isSealed(obj: {}, msg?: string): void;
355 | sealed(obj: {}, msg?: string): void;
356 | isNotSealed(obj: {}, msg?: string): void;
357 | notSealed(obj: {}, msg?: string): void;
358 |
359 | isFrozen(obj: Object, msg?: string): void;
360 | frozen(obj: Object, msg?: string): void;
361 | isNotFrozen(obj: Object, msg?: string): void;
362 | notFrozen(obj: Object, msg?: string): void;
363 |
364 |
365 | }
366 |
367 | export interface Config {
368 | includeStack: boolean;
369 | }
370 |
371 | export class AssertionError {
372 | constructor(message: string, _props?: any, ssf?: Function);
373 | name: string;
374 | message: string;
375 | showDiff: boolean;
376 | stack: string;
377 | }
378 | }
379 |
380 | declare var chai: Chai.ChaiStatic;
381 |
382 | declare module "chai" {
383 | export = chai;
384 | }
385 |
386 | interface Object {
387 | should: Chai.Assertion;
388 | }
389 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
341 |
--------------------------------------------------------------------------------
/src/typings/node/node.d.ts:
--------------------------------------------------------------------------------
1 | // Type definitions for Node.js v4.x
2 | // Project: http://nodejs.org/
3 | // Definitions by: Microsoft TypeScript , DefinitelyTyped
4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped
5 |
6 | /************************************************
7 | * *
8 | * Node.js v4.x API *
9 | * *
10 | ************************************************/
11 |
12 | interface Error {
13 | stack?: string;
14 | }
15 |
16 |
17 | // compat for TypeScript 1.5.3
18 | // if you use with --target es3 or --target es5 and use below definitions,
19 | // use the lib.es6.d.ts that is bundled with TypeScript 1.5.3.
20 | interface MapConstructor {}
21 | interface WeakMapConstructor {}
22 | interface SetConstructor {}
23 | interface WeakSetConstructor {}
24 |
25 | /************************************************
26 | * *
27 | * GLOBAL *
28 | * *
29 | ************************************************/
30 | declare var process: NodeJS.Process;
31 | declare var global: NodeJS.Global;
32 |
33 | declare var __filename: string;
34 | declare var __dirname: string;
35 |
36 | declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
37 | declare function clearTimeout(timeoutId: NodeJS.Timer): void;
38 | declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer;
39 | declare function clearInterval(intervalId: NodeJS.Timer): void;
40 | declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any;
41 | declare function clearImmediate(immediateId: any): void;
42 |
43 | interface NodeRequireFunction {
44 | (id: string): any;
45 | }
46 |
47 | interface NodeRequire extends NodeRequireFunction {
48 | resolve(id:string): string;
49 | cache: any;
50 | extensions: any;
51 | main: any;
52 | }
53 |
54 | declare var require: NodeRequire;
55 |
56 | interface NodeModule {
57 | exports: any;
58 | require: NodeRequireFunction;
59 | id: string;
60 | filename: string;
61 | loaded: boolean;
62 | parent: any;
63 | children: any[];
64 | }
65 |
66 | declare var module: NodeModule;
67 |
68 | // Same as module.exports
69 | declare var exports: any;
70 | declare var SlowBuffer: {
71 | new (str: string, encoding?: string): Buffer;
72 | new (size: number): Buffer;
73 | new (size: Uint8Array): Buffer;
74 | new (array: any[]): Buffer;
75 | prototype: Buffer;
76 | isBuffer(obj: any): boolean;
77 | byteLength(string: string, encoding?: string): number;
78 | concat(list: Buffer[], totalLength?: number): Buffer;
79 | };
80 |
81 |
82 | // Buffer class
83 | interface Buffer extends NodeBuffer {}
84 |
85 | /**
86 | * Raw data is stored in instances of the Buffer class.
87 | * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
88 | * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
89 | */
90 | declare var Buffer: {
91 | /**
92 | * Allocates a new buffer containing the given {str}.
93 | *
94 | * @param str String to store in buffer.
95 | * @param encoding encoding to use, optional. Default is 'utf8'
96 | */
97 | new (str: string, encoding?: string): Buffer;
98 | /**
99 | * Allocates a new buffer of {size} octets.
100 | *
101 | * @param size count of octets to allocate.
102 | */
103 | new (size: number): Buffer;
104 | /**
105 | * Allocates a new buffer containing the given {array} of octets.
106 | *
107 | * @param array The octets to store.
108 | */
109 | new (array: Uint8Array): Buffer;
110 | /**
111 | * Allocates a new buffer containing the given {array} of octets.
112 | *
113 | * @param array The octets to store.
114 | */
115 | new (array: any[]): Buffer;
116 | prototype: Buffer;
117 | /**
118 | * Returns true if {obj} is a Buffer
119 | *
120 | * @param obj object to test.
121 | */
122 | isBuffer(obj: any): obj is Buffer;
123 | /**
124 | * Returns true if {encoding} is a valid encoding argument.
125 | * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
126 | *
127 | * @param encoding string to test.
128 | */
129 | isEncoding(encoding: string): boolean;
130 | /**
131 | * Gives the actual byte length of a string. encoding defaults to 'utf8'.
132 | * This is not the same as String.prototype.length since that returns the number of characters in a string.
133 | *
134 | * @param string string to test.
135 | * @param encoding encoding used to evaluate (defaults to 'utf8')
136 | */
137 | byteLength(string: string, encoding?: string): number;
138 | /**
139 | * Returns a buffer which is the result of concatenating all the buffers in the list together.
140 | *
141 | * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
142 | * If the list has exactly one item, then the first item of the list is returned.
143 | * If the list has more than one item, then a new Buffer is created.
144 | *
145 | * @param list An array of Buffer objects to concatenate
146 | * @param totalLength Total length of the buffers when concatenated.
147 | * 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.
148 | */
149 | concat(list: Buffer[], totalLength?: number): Buffer;
150 | /**
151 | * The same as buf1.compare(buf2).
152 | */
153 | compare(buf1: Buffer, buf2: Buffer): number;
154 | };
155 |
156 | /************************************************
157 | * *
158 | * GLOBAL INTERFACES *
159 | * *
160 | ************************************************/
161 | declare module NodeJS {
162 | export interface ErrnoException extends Error {
163 | errno?: number;
164 | code?: string;
165 | path?: string;
166 | syscall?: string;
167 | stack?: string;
168 | }
169 |
170 | export interface EventEmitter {
171 | addListener(event: string, listener: Function): EventEmitter;
172 | on(event: string, listener: Function): EventEmitter;
173 | once(event: string, listener: Function): EventEmitter;
174 | removeListener(event: string, listener: Function): EventEmitter;
175 | removeAllListeners(event?: string): EventEmitter;
176 | setMaxListeners(n: number): void;
177 | listeners(event: string): Function[];
178 | emit(event: string, ...args: any[]): boolean;
179 | }
180 |
181 | export interface ReadableStream extends EventEmitter {
182 | readable: boolean;
183 | read(size?: number): string|Buffer;
184 | setEncoding(encoding: string): void;
185 | pause(): void;
186 | resume(): void;
187 | pipe(destination: T, options?: { end?: boolean; }): T;
188 | unpipe(destination?: T): void;
189 | unshift(chunk: string): void;
190 | unshift(chunk: Buffer): void;
191 | wrap(oldStream: ReadableStream): ReadableStream;
192 | }
193 |
194 | export interface WritableStream extends EventEmitter {
195 | writable: boolean;
196 | write(buffer: Buffer|string, cb?: Function): boolean;
197 | write(str: string, encoding?: string, cb?: Function): boolean;
198 | end(): void;
199 | end(buffer: Buffer, cb?: Function): void;
200 | end(str: string, cb?: Function): void;
201 | end(str: string, encoding?: string, cb?: Function): void;
202 | }
203 |
204 | export interface ReadWriteStream extends ReadableStream, WritableStream {}
205 |
206 | export interface Process extends EventEmitter {
207 | stdout: WritableStream;
208 | stderr: WritableStream;
209 | stdin: ReadableStream;
210 | argv: string[];
211 | execPath: string;
212 | abort(): void;
213 | chdir(directory: string): void;
214 | cwd(): string;
215 | env: any;
216 | exit(code?: number): void;
217 | getgid(): number;
218 | setgid(id: number): void;
219 | setgid(id: string): void;
220 | getuid(): number;
221 | setuid(id: number): void;
222 | setuid(id: string): void;
223 | version: string;
224 | versions: {
225 | http_parser: string;
226 | node: string;
227 | v8: string;
228 | ares: string;
229 | uv: string;
230 | zlib: string;
231 | openssl: string;
232 | };
233 | config: {
234 | target_defaults: {
235 | cflags: any[];
236 | default_configuration: string;
237 | defines: string[];
238 | include_dirs: string[];
239 | libraries: string[];
240 | };
241 | variables: {
242 | clang: number;
243 | host_arch: string;
244 | node_install_npm: boolean;
245 | node_install_waf: boolean;
246 | node_prefix: string;
247 | node_shared_openssl: boolean;
248 | node_shared_v8: boolean;
249 | node_shared_zlib: boolean;
250 | node_use_dtrace: boolean;
251 | node_use_etw: boolean;
252 | node_use_openssl: boolean;
253 | target_arch: string;
254 | v8_no_strict_aliasing: number;
255 | v8_use_snapshot: boolean;
256 | visibility: string;
257 | };
258 | };
259 | kill(pid: number, signal?: string): void;
260 | pid: number;
261 | title: string;
262 | arch: string;
263 | platform: string;
264 | memoryUsage(): { rss: number; heapTotal: number; heapUsed: number; };
265 | nextTick(callback: Function): void;
266 | umask(mask?: number): number;
267 | uptime(): number;
268 | hrtime(time?:number[]): number[];
269 |
270 | // Worker
271 | send?(message: any, sendHandle?: any): void;
272 | }
273 |
274 | export interface Global {
275 | Array: typeof Array;
276 | ArrayBuffer: typeof ArrayBuffer;
277 | Boolean: typeof Boolean;
278 | Buffer: typeof Buffer;
279 | DataView: typeof DataView;
280 | Date: typeof Date;
281 | Error: typeof Error;
282 | EvalError: typeof EvalError;
283 | Float32Array: typeof Float32Array;
284 | Float64Array: typeof Float64Array;
285 | Function: typeof Function;
286 | GLOBAL: Global;
287 | Infinity: typeof Infinity;
288 | Int16Array: typeof Int16Array;
289 | Int32Array: typeof Int32Array;
290 | Int8Array: typeof Int8Array;
291 | Intl: typeof Intl;
292 | JSON: typeof JSON;
293 | Map: MapConstructor;
294 | Math: typeof Math;
295 | NaN: typeof NaN;
296 | Number: typeof Number;
297 | Object: typeof Object;
298 | Promise: Function;
299 | RangeError: typeof RangeError;
300 | ReferenceError: typeof ReferenceError;
301 | RegExp: typeof RegExp;
302 | Set: SetConstructor;
303 | String: typeof String;
304 | Symbol: Function;
305 | SyntaxError: typeof SyntaxError;
306 | TypeError: typeof TypeError;
307 | URIError: typeof URIError;
308 | Uint16Array: typeof Uint16Array;
309 | Uint32Array: typeof Uint32Array;
310 | Uint8Array: typeof Uint8Array;
311 | Uint8ClampedArray: Function;
312 | WeakMap: WeakMapConstructor;
313 | WeakSet: WeakSetConstructor;
314 | clearImmediate: (immediateId: any) => void;
315 | clearInterval: (intervalId: NodeJS.Timer) => void;
316 | clearTimeout: (timeoutId: NodeJS.Timer) => void;
317 | console: typeof console;
318 | decodeURI: typeof decodeURI;
319 | decodeURIComponent: typeof decodeURIComponent;
320 | encodeURI: typeof encodeURI;
321 | encodeURIComponent: typeof encodeURIComponent;
322 | escape: (str: string) => string;
323 | eval: typeof eval;
324 | global: Global;
325 | isFinite: typeof isFinite;
326 | isNaN: typeof isNaN;
327 | parseFloat: typeof parseFloat;
328 | parseInt: typeof parseInt;
329 | process: Process;
330 | root: Global;
331 | setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => any;
332 | setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer;
333 | setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timer;
334 | undefined: typeof undefined;
335 | unescape: (str: string) => string;
336 | gc: () => void;
337 | v8debug?: any;
338 | }
339 |
340 | export interface Timer {
341 | ref() : void;
342 | unref() : void;
343 | }
344 | }
345 |
346 | /**
347 | * @deprecated
348 | */
349 | interface NodeBuffer {
350 | [index: number]: number;
351 | write(string: string, offset?: number, length?: number, encoding?: string): number;
352 | toString(encoding?: string, start?: number, end?: number): string;
353 | toJSON(): any;
354 | length: number;
355 | equals(otherBuffer: Buffer): boolean;
356 | compare(otherBuffer: Buffer): number;
357 | copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
358 | slice(start?: number, end?: number): Buffer;
359 | writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
360 | writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
361 | writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
362 | writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
363 | readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
364 | readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
365 | readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
366 | readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
367 | readUInt8(offset: number, noAsset?: boolean): number;
368 | readUInt16LE(offset: number, noAssert?: boolean): number;
369 | readUInt16BE(offset: number, noAssert?: boolean): number;
370 | readUInt32LE(offset: number, noAssert?: boolean): number;
371 | readUInt32BE(offset: number, noAssert?: boolean): number;
372 | readInt8(offset: number, noAssert?: boolean): number;
373 | readInt16LE(offset: number, noAssert?: boolean): number;
374 | readInt16BE(offset: number, noAssert?: boolean): number;
375 | readInt32LE(offset: number, noAssert?: boolean): number;
376 | readInt32BE(offset: number, noAssert?: boolean): number;
377 | readFloatLE(offset: number, noAssert?: boolean): number;
378 | readFloatBE(offset: number, noAssert?: boolean): number;
379 | readDoubleLE(offset: number, noAssert?: boolean): number;
380 | readDoubleBE(offset: number, noAssert?: boolean): number;
381 | writeUInt8(value: number, offset: number, noAssert?: boolean): number;
382 | writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
383 | writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
384 | writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
385 | writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
386 | writeInt8(value: number, offset: number, noAssert?: boolean): number;
387 | writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
388 | writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
389 | writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
390 | writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
391 | writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
392 | writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
393 | writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
394 | writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
395 | fill(value: any, offset?: number, end?: number): Buffer;
396 | }
397 |
398 | /************************************************
399 | * *
400 | * MODULES *
401 | * *
402 | ************************************************/
403 | declare module "buffer" {
404 | export var INSPECT_MAX_BYTES: number;
405 | }
406 |
407 | declare module "querystring" {
408 | export function stringify(obj: any, sep?: string, eq?: string): string;
409 | export function parse(str: string, sep?: string, eq?: string, options?: { maxKeys?: number; }): any;
410 | export function escape(str: string): string;
411 | export function unescape(str: string): string;
412 | }
413 |
414 | declare module "events" {
415 | export class EventEmitter implements NodeJS.EventEmitter {
416 | static listenerCount(emitter: EventEmitter, event: string): number;
417 |
418 | addListener(event: string, listener: Function): EventEmitter;
419 | on(event: string, listener: Function): EventEmitter;
420 | once(event: string, listener: Function): EventEmitter;
421 | removeListener(event: string, listener: Function): EventEmitter;
422 | removeAllListeners(event?: string): EventEmitter;
423 | setMaxListeners(n: number): void;
424 | listeners(event: string): Function[];
425 | emit(event: string, ...args: any[]): boolean;
426 | }
427 | }
428 |
429 | declare module "http" {
430 | import * as events from "events";
431 | import * as net from "net";
432 | import * as stream from "stream";
433 |
434 | export interface RequestOptions {
435 | protocol?: string;
436 | host?: string;
437 | hostname?: string;
438 | family?: number;
439 | port?: number
440 | localAddress?: string;
441 | socketPath?: string;
442 | method?: string;
443 | path?: string;
444 | headers?: { [key: string]: any };
445 | auth?: string;
446 | agent?: Agent;
447 | }
448 |
449 | export interface Server extends events.EventEmitter {
450 | listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server;
451 | listen(port: number, hostname?: string, callback?: Function): Server;
452 | listen(path: string, callback?: Function): Server;
453 | listen(handle: any, listeningListener?: Function): Server;
454 | close(cb?: any): Server;
455 | address(): { port: number; family: string; address: string; };
456 | maxHeadersCount: number;
457 | }
458 | /**
459 | * @deprecated Use IncomingMessage
460 | */
461 | export interface ServerRequest extends IncomingMessage {
462 | connection: net.Socket;
463 | }
464 | export interface ServerResponse extends events.EventEmitter, stream.Writable {
465 | // Extended base methods
466 | write(buffer: Buffer): boolean;
467 | write(buffer: Buffer, cb?: Function): boolean;
468 | write(str: string, cb?: Function): boolean;
469 | write(str: string, encoding?: string, cb?: Function): boolean;
470 | write(str: string, encoding?: string, fd?: string): boolean;
471 |
472 | writeContinue(): void;
473 | writeHead(statusCode: number, reasonPhrase?: string, headers?: any): void;
474 | writeHead(statusCode: number, headers?: any): void;
475 | statusCode: number;
476 | statusMessage: string;
477 | setHeader(name: string, value: string): void;
478 | sendDate: boolean;
479 | getHeader(name: string): string;
480 | removeHeader(name: string): void;
481 | write(chunk: any, encoding?: string): any;
482 | addTrailers(headers: any): void;
483 |
484 | // Extended base methods
485 | end(): void;
486 | end(buffer: Buffer, cb?: Function): void;
487 | end(str: string, cb?: Function): void;
488 | end(str: string, encoding?: string, cb?: Function): void;
489 | end(data?: any, encoding?: string): void;
490 | }
491 | export interface ClientRequest extends events.EventEmitter, stream.Writable {
492 | // Extended base methods
493 | write(buffer: Buffer): boolean;
494 | write(buffer: Buffer, cb?: Function): boolean;
495 | write(str: string, cb?: Function): boolean;
496 | write(str: string, encoding?: string, cb?: Function): boolean;
497 | write(str: string, encoding?: string, fd?: string): boolean;
498 |
499 | write(chunk: any, encoding?: string): void;
500 | abort(): void;
501 | setTimeout(timeout: number, callback?: Function): void;
502 | setNoDelay(noDelay?: boolean): void;
503 | setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
504 |
505 | // Extended base methods
506 | end(): void;
507 | end(buffer: Buffer, cb?: Function): void;
508 | end(str: string, cb?: Function): void;
509 | end(str: string, encoding?: string, cb?: Function): void;
510 | end(data?: any, encoding?: string): void;
511 | }
512 | export interface IncomingMessage extends events.EventEmitter, stream.Readable {
513 | httpVersion: string;
514 | headers: any;
515 | rawHeaders: string[];
516 | trailers: any;
517 | rawTrailers: any;
518 | setTimeout(msecs: number, callback: Function): NodeJS.Timer;
519 | /**
520 | * Only valid for request obtained from http.Server.
521 | */
522 | method?: string;
523 | /**
524 | * Only valid for request obtained from http.Server.
525 | */
526 | url?: string;
527 | /**
528 | * Only valid for response obtained from http.ClientRequest.
529 | */
530 | statusCode?: number;
531 | /**
532 | * Only valid for response obtained from http.ClientRequest.
533 | */
534 | statusMessage?: string;
535 | socket: net.Socket;
536 | }
537 | /**
538 | * @deprecated Use IncomingMessage
539 | */
540 | export interface ClientResponse extends IncomingMessage { }
541 |
542 | export interface AgentOptions {
543 | /**
544 | * Keep sockets around in a pool to be used by other requests in the future. Default = false
545 | */
546 | keepAlive?: boolean;
547 | /**
548 | * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
549 | * Only relevant if keepAlive is set to true.
550 | */
551 | keepAliveMsecs?: number;
552 | /**
553 | * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
554 | */
555 | maxSockets?: number;
556 | /**
557 | * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
558 | */
559 | maxFreeSockets?: number;
560 | }
561 |
562 | export class Agent {
563 | maxSockets: number;
564 | sockets: any;
565 | requests: any;
566 |
567 | constructor(opts?: AgentOptions);
568 |
569 | /**
570 | * Destroy any sockets that are currently in use by the agent.
571 | * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
572 | * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
573 | * sockets may hang open for quite a long time before the server terminates them.
574 | */
575 | destroy(): void;
576 | }
577 |
578 | export var METHODS: string[];
579 |
580 | export var STATUS_CODES: {
581 | [errorCode: number]: string;
582 | [errorCode: string]: string;
583 | };
584 | export function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) =>void ): Server;
585 | export function createClient(port?: number, host?: string): any;
586 | export function request(options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
587 | export function get(options: any, callback?: (res: IncomingMessage) => void): ClientRequest;
588 | export var globalAgent: Agent;
589 | }
590 |
591 | declare module "cluster" {
592 | import * as child from "child_process";
593 | import * as events from "events";
594 |
595 | export interface ClusterSettings {
596 | exec?: string;
597 | args?: string[];
598 | silent?: boolean;
599 | }
600 |
601 | export class Worker extends events.EventEmitter {
602 | id: string;
603 | process: child.ChildProcess;
604 | suicide: boolean;
605 | send(message: any, sendHandle?: any): void;
606 | kill(signal?: string): void;
607 | destroy(signal?: string): void;
608 | disconnect(): void;
609 | }
610 |
611 | export var settings: ClusterSettings;
612 | export var isMaster: boolean;
613 | export var isWorker: boolean;
614 | export function setupMaster(settings?: ClusterSettings): void;
615 | export function fork(env?: any): Worker;
616 | export function disconnect(callback?: Function): void;
617 | export var worker: Worker;
618 | export var workers: Worker[];
619 |
620 | // Event emitter
621 | export function addListener(event: string, listener: Function): void;
622 | export function on(event: string, listener: Function): any;
623 | export function once(event: string, listener: Function): void;
624 | export function removeListener(event: string, listener: Function): void;
625 | export function removeAllListeners(event?: string): void;
626 | export function setMaxListeners(n: number): void;
627 | export function listeners(event: string): Function[];
628 | export function emit(event: string, ...args: any[]): boolean;
629 | }
630 |
631 | declare module "zlib" {
632 | import * as stream from "stream";
633 | export interface ZlibOptions { chunkSize?: number; windowBits?: number; level?: number; memLevel?: number; strategy?: number; dictionary?: any; }
634 |
635 | export interface Gzip extends stream.Transform { }
636 | export interface Gunzip extends stream.Transform { }
637 | export interface Deflate extends stream.Transform { }
638 | export interface Inflate extends stream.Transform { }
639 | export interface DeflateRaw extends stream.Transform { }
640 | export interface InflateRaw extends stream.Transform { }
641 | export interface Unzip extends stream.Transform { }
642 |
643 | export function createGzip(options?: ZlibOptions): Gzip;
644 | export function createGunzip(options?: ZlibOptions): Gunzip;
645 | export function createDeflate(options?: ZlibOptions): Deflate;
646 | export function createInflate(options?: ZlibOptions): Inflate;
647 | export function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
648 | export function createInflateRaw(options?: ZlibOptions): InflateRaw;
649 | export function createUnzip(options?: ZlibOptions): Unzip;
650 |
651 | export function deflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
652 | export function deflateSync(buf: Buffer, options?: ZlibOptions): any;
653 | export function deflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
654 | export function deflateRawSync(buf: Buffer, options?: ZlibOptions): any;
655 | export function gzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
656 | export function gzipSync(buf: Buffer, options?: ZlibOptions): any;
657 | export function gunzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
658 | export function gunzipSync(buf: Buffer, options?: ZlibOptions): any;
659 | export function inflate(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
660 | export function inflateSync(buf: Buffer, options?: ZlibOptions): any;
661 | export function inflateRaw(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
662 | export function inflateRawSync(buf: Buffer, options?: ZlibOptions): any;
663 | export function unzip(buf: Buffer, callback: (error: Error, result: any) =>void ): void;
664 | export function unzipSync(buf: Buffer, options?: ZlibOptions): any;
665 |
666 | // Constants
667 | export var Z_NO_FLUSH: number;
668 | export var Z_PARTIAL_FLUSH: number;
669 | export var Z_SYNC_FLUSH: number;
670 | export var Z_FULL_FLUSH: number;
671 | export var Z_FINISH: number;
672 | export var Z_BLOCK: number;
673 | export var Z_TREES: number;
674 | export var Z_OK: number;
675 | export var Z_STREAM_END: number;
676 | export var Z_NEED_DICT: number;
677 | export var Z_ERRNO: number;
678 | export var Z_STREAM_ERROR: number;
679 | export var Z_DATA_ERROR: number;
680 | export var Z_MEM_ERROR: number;
681 | export var Z_BUF_ERROR: number;
682 | export var Z_VERSION_ERROR: number;
683 | export var Z_NO_COMPRESSION: number;
684 | export var Z_BEST_SPEED: number;
685 | export var Z_BEST_COMPRESSION: number;
686 | export var Z_DEFAULT_COMPRESSION: number;
687 | export var Z_FILTERED: number;
688 | export var Z_HUFFMAN_ONLY: number;
689 | export var Z_RLE: number;
690 | export var Z_FIXED: number;
691 | export var Z_DEFAULT_STRATEGY: number;
692 | export var Z_BINARY: number;
693 | export var Z_TEXT: number;
694 | export var Z_ASCII: number;
695 | export var Z_UNKNOWN: number;
696 | export var Z_DEFLATED: number;
697 | export var Z_NULL: number;
698 | }
699 |
700 | declare module "os" {
701 | export function tmpdir(): string;
702 | export function hostname(): string;
703 | export function type(): string;
704 | export function platform(): string;
705 | export function arch(): string;
706 | export function release(): string;
707 | export function uptime(): number;
708 | export function loadavg(): number[];
709 | export function totalmem(): number;
710 | export function freemem(): number;
711 | export function cpus(): { model: string; speed: number; times: { user: number; nice: number; sys: number; idle: number; irq: number; }; }[];
712 | export function networkInterfaces(): any;
713 | export var EOL: string;
714 | }
715 |
716 | declare module "https" {
717 | import * as tls from "tls";
718 | import * as events from "events";
719 | import * as http from "http";
720 |
721 | export interface ServerOptions {
722 | pfx?: any;
723 | key?: any;
724 | passphrase?: string;
725 | cert?: any;
726 | ca?: any;
727 | crl?: any;
728 | ciphers?: string;
729 | honorCipherOrder?: boolean;
730 | requestCert?: boolean;
731 | rejectUnauthorized?: boolean;
732 | NPNProtocols?: any;
733 | SNICallback?: (servername: string) => any;
734 | }
735 |
736 | export interface RequestOptions extends http.RequestOptions{
737 | pfx?: any;
738 | key?: any;
739 | passphrase?: string;
740 | cert?: any;
741 | ca?: any;
742 | ciphers?: string;
743 | rejectUnauthorized?: boolean;
744 | secureProtocol?: string;
745 | }
746 |
747 | export interface Agent {
748 | maxSockets: number;
749 | sockets: any;
750 | requests: any;
751 | }
752 | export var Agent: {
753 | new (options?: RequestOptions): Agent;
754 | };
755 | export interface Server extends tls.Server { }
756 | export function createServer(options: ServerOptions, requestListener?: Function): Server;
757 | export function request(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest;
758 | export function get(options: RequestOptions, callback?: (res: http.IncomingMessage) =>void ): http.ClientRequest;
759 | export var globalAgent: Agent;
760 | }
761 |
762 | declare module "punycode" {
763 | export function decode(string: string): string;
764 | export function encode(string: string): string;
765 | export function toUnicode(domain: string): string;
766 | export function toASCII(domain: string): string;
767 | export var ucs2: ucs2;
768 | interface ucs2 {
769 | decode(string: string): number[];
770 | encode(codePoints: number[]): string;
771 | }
772 | export var version: any;
773 | }
774 |
775 | declare module "repl" {
776 | import * as stream from "stream";
777 | import * as events from "events";
778 |
779 | export interface ReplOptions {
780 | prompt?: string;
781 | input?: NodeJS.ReadableStream;
782 | output?: NodeJS.WritableStream;
783 | terminal?: boolean;
784 | eval?: Function;
785 | useColors?: boolean;
786 | useGlobal?: boolean;
787 | ignoreUndefined?: boolean;
788 | writer?: Function;
789 | }
790 | export function start(options: ReplOptions): events.EventEmitter;
791 | }
792 |
793 | declare module "readline" {
794 | import * as events from "events";
795 | import * as stream from "stream";
796 |
797 | export interface ReadLine extends events.EventEmitter {
798 | setPrompt(prompt: string): void;
799 | prompt(preserveCursor?: boolean): void;
800 | question(query: string, callback: Function): void;
801 | pause(): void;
802 | resume(): void;
803 | close(): void;
804 | write(data: any, key?: any): void;
805 | }
806 | export interface ReadLineOptions {
807 | input: NodeJS.ReadableStream;
808 | output: NodeJS.WritableStream;
809 | completer?: Function;
810 | terminal?: boolean;
811 | }
812 | export function createInterface(options: ReadLineOptions): ReadLine;
813 | }
814 |
815 | declare module "vm" {
816 | export interface Context { }
817 | export interface Script {
818 | runInThisContext(): void;
819 | runInNewContext(sandbox?: Context): void;
820 | }
821 | export function runInThisContext(code: string, filename?: string): void;
822 | export function runInNewContext(code: string, sandbox?: Context, filename?: string): void;
823 | export function runInContext(code: string, context: Context, filename?: string): void;
824 | export function createContext(initSandbox?: Context): Context;
825 | export function createScript(code: string, filename?: string): Script;
826 | }
827 |
828 | declare module "child_process" {
829 | import * as events from "events";
830 | import * as stream from "stream";
831 |
832 | export interface ChildProcess extends events.EventEmitter {
833 | stdin: stream.Writable;
834 | stdout: stream.Readable;
835 | stderr: stream.Readable;
836 | pid: number;
837 | kill(signal?: string): void;
838 | send(message: any, sendHandle?: any): void;
839 | disconnect(): void;
840 | unref(): void;
841 | }
842 |
843 | export function spawn(command: string, args?: string[], options?: {
844 | cwd?: string;
845 | stdio?: any;
846 | custom?: any;
847 | env?: any;
848 | detached?: boolean;
849 | }): ChildProcess;
850 | export function exec(command: string, options: {
851 | cwd?: string;
852 | stdio?: any;
853 | customFds?: any;
854 | env?: any;
855 | encoding?: string;
856 | timeout?: number;
857 | maxBuffer?: number;
858 | killSignal?: string;
859 | }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
860 | export function exec(command: string, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
861 | export function execFile(file: string,
862 | callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
863 | export function execFile(file: string, args?: string[],
864 | callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
865 | export function execFile(file: string, args?: string[], options?: {
866 | cwd?: string;
867 | stdio?: any;
868 | customFds?: any;
869 | env?: any;
870 | encoding?: string;
871 | timeout?: number;
872 | maxBuffer?: number;
873 | killSignal?: string;
874 | }, callback?: (error: Error, stdout: Buffer, stderr: Buffer) =>void ): ChildProcess;
875 | export function fork(modulePath: string, args?: string[], options?: {
876 | cwd?: string;
877 | env?: any;
878 | encoding?: string;
879 | }): ChildProcess;
880 | export function spawnSync(command: string, args?: string[], options?: {
881 | cwd?: string;
882 | input?: string | Buffer;
883 | stdio?: any;
884 | env?: any;
885 | uid?: number;
886 | gid?: number;
887 | timeout?: number;
888 | maxBuffer?: number;
889 | killSignal?: string;
890 | encoding?: string;
891 | }): {
892 | pid: number;
893 | output: string[];
894 | stdout: string | Buffer;
895 | stderr: string | Buffer;
896 | status: number;
897 | signal: string;
898 | error: Error;
899 | };
900 | export function execSync(command: string, options?: {
901 | cwd?: string;
902 | input?: string|Buffer;
903 | stdio?: any;
904 | env?: any;
905 | uid?: number;
906 | gid?: number;
907 | timeout?: number;
908 | maxBuffer?: number;
909 | killSignal?: string;
910 | encoding?: string;
911 | }): string | Buffer;
912 | export function execFileSync(command: string, args?: string[], options?: {
913 | cwd?: string;
914 | input?: string|Buffer;
915 | stdio?: any;
916 | env?: any;
917 | uid?: number;
918 | gid?: number;
919 | timeout?: number;
920 | maxBuffer?: number;
921 | killSignal?: string;
922 | encoding?: string;
923 | }): string | Buffer;
924 | }
925 |
926 | declare module "url" {
927 | export interface Url {
928 | href?: string;
929 | protocol?: string;
930 | auth?: string;
931 | hostname?: string;
932 | port?: string;
933 | host?: string;
934 | pathname?: string;
935 | search?: string;
936 | query?: any; // string | Object
937 | slashes?: boolean;
938 | hash?: string;
939 | path?: string;
940 | }
941 |
942 | export function parse(urlStr: string, parseQueryString?: boolean , slashesDenoteHost?: boolean ): Url;
943 | export function format(url: Url): string;
944 | export function resolve(from: string, to: string): string;
945 | }
946 |
947 | declare module "dns" {
948 | export function lookup(domain: string, family: number, callback: (err: Error, address: string, family: number) =>void ): string;
949 | export function lookup(domain: string, callback: (err: Error, address: string, family: number) =>void ): string;
950 | export function resolve(domain: string, rrtype: string, callback: (err: Error, addresses: string[]) =>void ): string[];
951 | export function resolve(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
952 | export function resolve4(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
953 | export function resolve6(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
954 | export function resolveMx(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
955 | export function resolveTxt(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
956 | export function resolveSrv(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
957 | export function resolveNs(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
958 | export function resolveCname(domain: string, callback: (err: Error, addresses: string[]) =>void ): string[];
959 | export function reverse(ip: string, callback: (err: Error, domains: string[]) =>void ): string[];
960 | }
961 |
962 | declare module "net" {
963 | import * as stream from "stream";
964 |
965 | export interface Socket extends stream.Duplex {
966 | // Extended base methods
967 | write(buffer: Buffer): boolean;
968 | write(buffer: Buffer, cb?: Function): boolean;
969 | write(str: string, cb?: Function): boolean;
970 | write(str: string, encoding?: string, cb?: Function): boolean;
971 | write(str: string, encoding?: string, fd?: string): boolean;
972 |
973 | connect(port: number, host?: string, connectionListener?: Function): void;
974 | connect(path: string, connectionListener?: Function): void;
975 | bufferSize: number;
976 | setEncoding(encoding?: string): void;
977 | write(data: any, encoding?: string, callback?: Function): void;
978 | destroy(): void;
979 | pause(): void;
980 | resume(): void;
981 | setTimeout(timeout: number, callback?: Function): void;
982 | setNoDelay(noDelay?: boolean): void;
983 | setKeepAlive(enable?: boolean, initialDelay?: number): void;
984 | address(): { port: number; family: string; address: string; };
985 | unref(): void;
986 | ref(): void;
987 |
988 | remoteAddress: string;
989 | remoteFamily: string;
990 | remotePort: number;
991 | localAddress: string;
992 | localPort: number;
993 | bytesRead: number;
994 | bytesWritten: number;
995 |
996 | // Extended base methods
997 | end(): void;
998 | end(buffer: Buffer, cb?: Function): void;
999 | end(str: string, cb?: Function): void;
1000 | end(str: string, encoding?: string, cb?: Function): void;
1001 | end(data?: any, encoding?: string): void;
1002 | }
1003 |
1004 | export var Socket: {
1005 | new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket;
1006 | };
1007 |
1008 | export interface Server extends Socket {
1009 | listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
1010 | listen(path: string, listeningListener?: Function): Server;
1011 | listen(handle: any, listeningListener?: Function): Server;
1012 | close(callback?: Function): Server;
1013 | address(): { port: number; family: string; address: string; };
1014 | maxConnections: number;
1015 | connections: number;
1016 | }
1017 | export function createServer(connectionListener?: (socket: Socket) =>void ): Server;
1018 | export function createServer(options?: { allowHalfOpen?: boolean; }, connectionListener?: (socket: Socket) =>void ): Server;
1019 | export function connect(options: { port: number, host?: string, localAddress? : string, localPort? : string, family? : number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket;
1020 | export function connect(port: number, host?: string, connectionListener?: Function): Socket;
1021 | export function connect(path: string, connectionListener?: Function): Socket;
1022 | export function createConnection(options: { port: number, host?: string, localAddress? : string, localPort? : string, family? : number, allowHalfOpen?: boolean; }, connectionListener?: Function): Socket;
1023 | export function createConnection(port: number, host?: string, connectionListener?: Function): Socket;
1024 | export function createConnection(path: string, connectionListener?: Function): Socket;
1025 | export function isIP(input: string): number;
1026 | export function isIPv4(input: string): boolean;
1027 | export function isIPv6(input: string): boolean;
1028 | }
1029 |
1030 | declare module "dgram" {
1031 | import * as events from "events";
1032 |
1033 | interface RemoteInfo {
1034 | address: string;
1035 | port: number;
1036 | size: number;
1037 | }
1038 |
1039 | interface AddressInfo {
1040 | address: string;
1041 | family: string;
1042 | port: number;
1043 | }
1044 |
1045 | export function createSocket(type: string, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
1046 |
1047 | interface Socket extends events.EventEmitter {
1048 | send(buf: Buffer, offset: number, length: number, port: number, address: string, callback?: (error: Error, bytes: number) => void): void;
1049 | bind(port: number, address?: string, callback?: () => void): void;
1050 | close(): void;
1051 | address(): AddressInfo;
1052 | setBroadcast(flag: boolean): void;
1053 | setMulticastTTL(ttl: number): void;
1054 | setMulticastLoopback(flag: boolean): void;
1055 | addMembership(multicastAddress: string, multicastInterface?: string): void;
1056 | dropMembership(multicastAddress: string, multicastInterface?: string): void;
1057 | }
1058 | }
1059 |
1060 | declare module "fs" {
1061 | import * as stream from "stream";
1062 | import * as events from "events";
1063 |
1064 | interface Stats {
1065 | isFile(): boolean;
1066 | isDirectory(): boolean;
1067 | isBlockDevice(): boolean;
1068 | isCharacterDevice(): boolean;
1069 | isSymbolicLink(): boolean;
1070 | isFIFO(): boolean;
1071 | isSocket(): boolean;
1072 | dev: number;
1073 | ino: number;
1074 | mode: number;
1075 | nlink: number;
1076 | uid: number;
1077 | gid: number;
1078 | rdev: number;
1079 | size: number;
1080 | blksize: number;
1081 | blocks: number;
1082 | atime: Date;
1083 | mtime: Date;
1084 | ctime: Date;
1085 | birthtime: Date;
1086 | }
1087 |
1088 | interface FSWatcher extends events.EventEmitter {
1089 | close(): void;
1090 | }
1091 |
1092 | export interface ReadStream extends stream.Readable {
1093 | close(): void;
1094 | }
1095 | export interface WriteStream extends stream.Writable {
1096 | close(): void;
1097 | bytesWritten: number;
1098 | }
1099 |
1100 | /**
1101 | * Asynchronous rename.
1102 | * @param oldPath
1103 | * @param newPath
1104 | * @param callback No arguments other than a possible exception are given to the completion callback.
1105 | */
1106 | export function rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1107 | /**
1108 | * Synchronous rename
1109 | * @param oldPath
1110 | * @param newPath
1111 | */
1112 | export function renameSync(oldPath: string, newPath: string): void;
1113 | export function truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1114 | export function truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1115 | export function truncateSync(path: string, len?: number): void;
1116 | export function ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1117 | export function ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1118 | export function ftruncateSync(fd: number, len?: number): void;
1119 | export function chown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1120 | export function chownSync(path: string, uid: number, gid: number): void;
1121 | export function fchown(fd: number, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1122 | export function fchownSync(fd: number, uid: number, gid: number): void;
1123 | export function lchown(path: string, uid: number, gid: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1124 | export function lchownSync(path: string, uid: number, gid: number): void;
1125 | export function chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1126 | export function chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1127 | export function chmodSync(path: string, mode: number): void;
1128 | export function chmodSync(path: string, mode: string): void;
1129 | export function fchmod(fd: number, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1130 | export function fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1131 | export function fchmodSync(fd: number, mode: number): void;
1132 | export function fchmodSync(fd: number, mode: string): void;
1133 | export function lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1134 | export function lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1135 | export function lchmodSync(path: string, mode: number): void;
1136 | export function lchmodSync(path: string, mode: string): void;
1137 | export function stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
1138 | export function lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
1139 | export function fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
1140 | export function statSync(path: string): Stats;
1141 | export function lstatSync(path: string): Stats;
1142 | export function fstatSync(fd: number): Stats;
1143 | export function link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1144 | export function linkSync(srcpath: string, dstpath: string): void;
1145 | export function symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1146 | export function symlinkSync(srcpath: string, dstpath: string, type?: string): void;
1147 | export function readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any): void;
1148 | export function readlinkSync(path: string): string;
1149 | export function realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
1150 | export function realpath(path: string, cache: {[path: string]: string}, callback: (err: NodeJS.ErrnoException, resolvedPath: string) =>any): void;
1151 | export function realpathSync(path: string, cache?: { [path: string]: string }): string;
1152 | /*
1153 | * Asynchronous unlink - deletes the file specified in {path}
1154 | *
1155 | * @param path
1156 | * @param callback No arguments other than a possible exception are given to the completion callback.
1157 | */
1158 | export function unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1159 | /*
1160 | * Synchronous unlink - deletes the file specified in {path}
1161 | *
1162 | * @param path
1163 | */
1164 | export function unlinkSync(path: string): void;
1165 | /*
1166 | * Asynchronous rmdir - removes the directory specified in {path}
1167 | *
1168 | * @param path
1169 | * @param callback No arguments other than a possible exception are given to the completion callback.
1170 | */
1171 | export function rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1172 | /*
1173 | * Synchronous rmdir - removes the directory specified in {path}
1174 | *
1175 | * @param path
1176 | */
1177 | export function rmdirSync(path: string): void;
1178 | /*
1179 | * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
1180 | *
1181 | * @param path
1182 | * @param callback No arguments other than a possible exception are given to the completion callback.
1183 | */
1184 | export function mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1185 | /*
1186 | * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
1187 | *
1188 | * @param path
1189 | * @param mode
1190 | * @param callback No arguments other than a possible exception are given to the completion callback.
1191 | */
1192 | export function mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1193 | /*
1194 | * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
1195 | *
1196 | * @param path
1197 | * @param mode
1198 | * @param callback No arguments other than a possible exception are given to the completion callback.
1199 | */
1200 | export function mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void): void;
1201 | /*
1202 | * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
1203 | *
1204 | * @param path
1205 | * @param mode
1206 | * @param callback No arguments other than a possible exception are given to the completion callback.
1207 | */
1208 | export function mkdirSync(path: string, mode?: number): void;
1209 | /*
1210 | * Synchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.
1211 | *
1212 | * @param path
1213 | * @param mode
1214 | * @param callback No arguments other than a possible exception are given to the completion callback.
1215 | */
1216 | export function mkdirSync(path: string, mode?: string): void;
1217 | export function readdir(path: string, callback?: (err: NodeJS.ErrnoException, files: string[]) => void): void;
1218 | export function readdirSync(path: string): string[];
1219 | export function close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1220 | export function closeSync(fd: number): void;
1221 | export function open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
1222 | export function open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
1223 | export function open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any): void;
1224 | export function openSync(path: string, flags: string, mode?: number): number;
1225 | export function openSync(path: string, flags: string, mode?: string): number;
1226 | export function utimes(path: string, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1227 | export function utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void;
1228 | export function utimesSync(path: string, atime: number, mtime: number): void;
1229 | export function utimesSync(path: string, atime: Date, mtime: Date): void;
1230 | export function futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1231 | export function futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void): void;
1232 | export function futimesSync(fd: number, atime: number, mtime: number): void;
1233 | export function futimesSync(fd: number, atime: Date, mtime: Date): void;
1234 | export function fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void): void;
1235 | export function fsyncSync(fd: number): void;
1236 | export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
1237 | export function write(fd: number, buffer: Buffer, offset: number, length: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void;
1238 | export function write(fd: number, data: any, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
1239 | export function write(fd: number, data: any, offset: number, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
1240 | export function write(fd: number, data: any, offset: number, encoding: string, callback?: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
1241 | export function writeSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
1242 | export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void;
1243 | export function readSync(fd: number, buffer: Buffer, offset: number, length: number, position: number): number;
1244 | /*
1245 | * Asynchronous readFile - Asynchronously reads the entire contents of a file.
1246 | *
1247 | * @param fileName
1248 | * @param encoding
1249 | * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
1250 | */
1251 | export function readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
1252 | /*
1253 | * Asynchronous readFile - Asynchronously reads the entire contents of a file.
1254 | *
1255 | * @param fileName
1256 | * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer.
1257 | * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
1258 | */
1259 | export function readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
1260 | /*
1261 | * Asynchronous readFile - Asynchronously reads the entire contents of a file.
1262 | *
1263 | * @param fileName
1264 | * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFile returns a string; otherwise it returns a Buffer.
1265 | * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
1266 | */
1267 | export function readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
1268 | /*
1269 | * Asynchronous readFile - Asynchronously reads the entire contents of a file.
1270 | *
1271 | * @param fileName
1272 | * @param callback - The callback is passed two arguments (err, data), where data is the contents of the file.
1273 | */
1274 | export function readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
1275 | /*
1276 | * Synchronous readFile - Synchronously reads the entire contents of a file.
1277 | *
1278 | * @param fileName
1279 | * @param encoding
1280 | */
1281 | export function readFileSync(filename: string, encoding: string): string;
1282 | /*
1283 | * Synchronous readFile - Synchronously reads the entire contents of a file.
1284 | *
1285 | * @param fileName
1286 | * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
1287 | */
1288 | export function readFileSync(filename: string, options: { encoding: string; flag?: string; }): string;
1289 | /*
1290 | * Synchronous readFile - Synchronously reads the entire contents of a file.
1291 | *
1292 | * @param fileName
1293 | * @param options An object with optional {encoding} and {flag} properties. If {encoding} is specified, readFileSync returns a string; otherwise it returns a Buffer.
1294 | */
1295 | export function readFileSync(filename: string, options?: { flag?: string; }): Buffer;
1296 | export function writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
1297 | export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
1298 | export function writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
1299 | export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
1300 | export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
1301 | export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
1302 | export function appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void;
1303 | export function appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void): void;
1304 | export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void;
1305 | export function appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): void;
1306 | export function watchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): void;
1307 | export function watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: (curr: Stats, prev: Stats) => void): void;
1308 | export function unwatchFile(filename: string, listener?: (curr: Stats, prev: Stats) => void): void;
1309 | export function watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher;
1310 | export function watch(filename: string, options: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher;
1311 | export function exists(path: string, callback?: (exists: boolean) => void): void;
1312 | export function existsSync(path: string): boolean;
1313 | /** Constant for fs.access(). File is visible to the calling process. */
1314 | export var F_OK: number;
1315 | /** Constant for fs.access(). File can be read by the calling process. */
1316 | export var R_OK: number;
1317 | /** Constant for fs.access(). File can be written by the calling process. */
1318 | export var W_OK: number;
1319 | /** Constant for fs.access(). File can be executed by the calling process. */
1320 | export var X_OK: number;
1321 | /** Tests a user's permissions for the file specified by path. */
1322 | export function access(path: string, callback: (err: NodeJS.ErrnoException) => void): void;
1323 | export function access(path: string, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
1324 | /** Synchronous version of fs.access. This throws if any accessibility checks fail, and does nothing otherwise. */
1325 | export function accessSync(path: string, mode ?: number): void;
1326 | export function createReadStream(path: string, options?: {
1327 | flags?: string;
1328 | encoding?: string;
1329 | fd?: number;
1330 | mode?: number;
1331 | autoClose?: boolean;
1332 | }): ReadStream;
1333 | export function createWriteStream(path: string, options?: {
1334 | flags?: string;
1335 | encoding?: string;
1336 | fd?: number;
1337 | mode?: number;
1338 | }): WriteStream;
1339 | }
1340 |
1341 | declare module "path" {
1342 |
1343 | /**
1344 | * A parsed path object generated by path.parse() or consumed by path.format().
1345 | */
1346 | export interface ParsedPath {
1347 | /**
1348 | * The root of the path such as '/' or 'c:\'
1349 | */
1350 | root: string;
1351 | /**
1352 | * The full directory path such as '/home/user/dir' or 'c:\path\dir'
1353 | */
1354 | dir: string;
1355 | /**
1356 | * The file name including extension (if any) such as 'index.html'
1357 | */
1358 | base: string;
1359 | /**
1360 | * The file extension (if any) such as '.html'
1361 | */
1362 | ext: string;
1363 | /**
1364 | * The file name without extension (if any) such as 'index'
1365 | */
1366 | name: string;
1367 | }
1368 |
1369 | /**
1370 | * Normalize a string path, reducing '..' and '.' parts.
1371 | * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
1372 | *
1373 | * @param p string path to normalize.
1374 | */
1375 | export function normalize(p: string): string;
1376 | /**
1377 | * Join all arguments together and normalize the resulting path.
1378 | * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
1379 | *
1380 | * @param paths string paths to join.
1381 | */
1382 | export function join(...paths: any[]): string;
1383 | /**
1384 | * Join all arguments together and normalize the resulting path.
1385 | * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
1386 | *
1387 | * @param paths string paths to join.
1388 | */
1389 | export function join(...paths: string[]): string;
1390 | /**
1391 | * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
1392 | *
1393 | * Starting from leftmost {from} paramter, resolves {to} to an absolute path.
1394 | *
1395 | * If {to} isn't already absolute, {from} arguments are prepended in right to left order, until an absolute path is found. If after using all {from} paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory.
1396 | *
1397 | * @param pathSegments string paths to join. Non-string arguments are ignored.
1398 | */
1399 | export function resolve(...pathSegments: any[]): string;
1400 | /**
1401 | * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
1402 | *
1403 | * @param path path to test.
1404 | */
1405 | export function isAbsolute(path: string): boolean;
1406 | /**
1407 | * Solve the relative path from {from} to {to}.
1408 | * 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.
1409 | *
1410 | * @param from
1411 | * @param to
1412 | */
1413 | export function relative(from: string, to: string): string;
1414 | /**
1415 | * Return the directory name of a path. Similar to the Unix dirname command.
1416 | *
1417 | * @param p the path to evaluate.
1418 | */
1419 | export function dirname(p: string): string;
1420 | /**
1421 | * Return the last portion of a path. Similar to the Unix basename command.
1422 | * Often used to extract the file name from a fully qualified path.
1423 | *
1424 | * @param p the path to evaluate.
1425 | * @param ext optionally, an extension to remove from the result.
1426 | */
1427 | export function basename(p: string, ext?: string): string;
1428 | /**
1429 | * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
1430 | * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
1431 | *
1432 | * @param p the path to evaluate.
1433 | */
1434 | export function extname(p: string): string;
1435 | /**
1436 | * The platform-specific file separator. '\\' or '/'.
1437 | */
1438 | export var sep: string;
1439 | /**
1440 | * The platform-specific file delimiter. ';' or ':'.
1441 | */
1442 | export var delimiter: string;
1443 | /**
1444 | * Returns an object from a path string - the opposite of format().
1445 | *
1446 | * @param pathString path to evaluate.
1447 | */
1448 | export function parse(pathString: string): ParsedPath;
1449 | /**
1450 | * Returns a path string from an object - the opposite of parse().
1451 | *
1452 | * @param pathString path to evaluate.
1453 | */
1454 | export function format(pathObject: ParsedPath): string;
1455 |
1456 | export module posix {
1457 | export function normalize(p: string): string;
1458 | export function join(...paths: any[]): string;
1459 | export function resolve(...pathSegments: any[]): string;
1460 | export function isAbsolute(p: string): boolean;
1461 | export function relative(from: string, to: string): string;
1462 | export function dirname(p: string): string;
1463 | export function basename(p: string, ext?: string): string;
1464 | export function extname(p: string): string;
1465 | export var sep: string;
1466 | export var delimiter: string;
1467 | export function parse(p: string): ParsedPath;
1468 | export function format(pP: ParsedPath): string;
1469 | }
1470 |
1471 | export module win32 {
1472 | export function normalize(p: string): string;
1473 | export function join(...paths: any[]): string;
1474 | export function resolve(...pathSegments: any[]): string;
1475 | export function isAbsolute(p: string): boolean;
1476 | export function relative(from: string, to: string): string;
1477 | export function dirname(p: string): string;
1478 | export function basename(p: string, ext?: string): string;
1479 | export function extname(p: string): string;
1480 | export var sep: string;
1481 | export var delimiter: string;
1482 | export function parse(p: string): ParsedPath;
1483 | export function format(pP: ParsedPath): string;
1484 | }
1485 | }
1486 |
1487 | declare module "string_decoder" {
1488 | export interface NodeStringDecoder {
1489 | write(buffer: Buffer): string;
1490 | detectIncompleteChar(buffer: Buffer): number;
1491 | }
1492 | export var StringDecoder: {
1493 | new (encoding: string): NodeStringDecoder;
1494 | };
1495 | }
1496 |
1497 | declare module "tls" {
1498 | import * as crypto from "crypto";
1499 | import * as net from "net";
1500 | import * as stream from "stream";
1501 |
1502 | var CLIENT_RENEG_LIMIT: number;
1503 | var CLIENT_RENEG_WINDOW: number;
1504 |
1505 | export interface TlsOptions {
1506 | pfx?: any; //string or buffer
1507 | key?: any; //string or buffer
1508 | passphrase?: string;
1509 | cert?: any;
1510 | ca?: any; //string or buffer
1511 | crl?: any; //string or string array
1512 | ciphers?: string;
1513 | honorCipherOrder?: any;
1514 | requestCert?: boolean;
1515 | rejectUnauthorized?: boolean;
1516 | NPNProtocols?: any; //array or Buffer;
1517 | SNICallback?: (servername: string) => any;
1518 | }
1519 |
1520 | export interface ConnectionOptions {
1521 | host?: string;
1522 | port?: number;
1523 | socket?: net.Socket;
1524 | pfx?: any; //string | Buffer
1525 | key?: any; //string | Buffer
1526 | passphrase?: string;
1527 | cert?: any; //string | Buffer
1528 | ca?: any; //Array of string | Buffer
1529 | rejectUnauthorized?: boolean;
1530 | NPNProtocols?: any; //Array of string | Buffer
1531 | servername?: string;
1532 | }
1533 |
1534 | export interface Server extends net.Server {
1535 | // Extended base methods
1536 | listen(port: number, host?: string, backlog?: number, listeningListener?: Function): Server;
1537 | listen(path: string, listeningListener?: Function): Server;
1538 | listen(handle: any, listeningListener?: Function): Server;
1539 |
1540 | listen(port: number, host?: string, callback?: Function): Server;
1541 | close(): Server;
1542 | address(): { port: number; family: string; address: string; };
1543 | addContext(hostName: string, credentials: {
1544 | key: string;
1545 | cert: string;
1546 | ca: string;
1547 | }): void;
1548 | maxConnections: number;
1549 | connections: number;
1550 | }
1551 |
1552 | export interface ClearTextStream extends stream.Duplex {
1553 | authorized: boolean;
1554 | authorizationError: Error;
1555 | getPeerCertificate(): any;
1556 | getCipher: {
1557 | name: string;
1558 | version: string;
1559 | };
1560 | address: {
1561 | port: number;
1562 | family: string;
1563 | address: string;
1564 | };
1565 | remoteAddress: string;
1566 | remotePort: number;
1567 | }
1568 |
1569 | export interface SecurePair {
1570 | encrypted: any;
1571 | cleartext: any;
1572 | }
1573 |
1574 | export interface SecureContextOptions {
1575 | pfx?: any; //string | buffer
1576 | key?: any; //string | buffer
1577 | passphrase?: string;
1578 | cert?: any; // string | buffer
1579 | ca?: any; // string | buffer
1580 | crl?: any; // string | string[]
1581 | ciphers?: string;
1582 | honorCipherOrder?: boolean;
1583 | }
1584 |
1585 | export interface SecureContext {
1586 | context: any;
1587 | }
1588 |
1589 | export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) =>void ): Server;
1590 | export function connect(options: TlsOptions, secureConnectionListener?: () =>void ): ClearTextStream;
1591 | export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream;
1592 | export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream;
1593 | export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
1594 | export function createSecureContext(details: SecureContextOptions): SecureContext;
1595 | }
1596 |
1597 | declare module "crypto" {
1598 | export interface CredentialDetails {
1599 | pfx: string;
1600 | key: string;
1601 | passphrase: string;
1602 | cert: string;
1603 | ca: any; //string | string array
1604 | crl: any; //string | string array
1605 | ciphers: string;
1606 | }
1607 | export interface Credentials { context?: any; }
1608 | export function createCredentials(details: CredentialDetails): Credentials;
1609 | export function createHash(algorithm: string): Hash;
1610 | export function createHmac(algorithm: string, key: string): Hmac;
1611 | export function createHmac(algorithm: string, key: Buffer): Hmac;
1612 | interface Hash {
1613 | update(data: any, input_encoding?: string): Hash;
1614 | digest(encoding: 'buffer'): Buffer;
1615 | digest(encoding: string): any;
1616 | digest(): Buffer;
1617 | }
1618 | interface Hmac {
1619 | update(data: any, input_encoding?: string): Hmac;
1620 | digest(encoding: 'buffer'): Buffer;
1621 | digest(encoding: string): any;
1622 | digest(): Buffer;
1623 | }
1624 | export function createCipher(algorithm: string, password: any): Cipher;
1625 | export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
1626 | interface Cipher {
1627 | update(data: Buffer): Buffer;
1628 | update(data: string, input_encoding?: string, output_encoding?: string): string;
1629 | final(): Buffer;
1630 | final(output_encoding: string): string;
1631 | setAutoPadding(auto_padding: boolean): void;
1632 | }
1633 | export function createDecipher(algorithm: string, password: any): Decipher;
1634 | export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
1635 | interface Decipher {
1636 | update(data: Buffer): Buffer;
1637 | update(data: string, input_encoding?: string, output_encoding?: string): string;
1638 | final(): Buffer;
1639 | final(output_encoding: string): string;
1640 | setAutoPadding(auto_padding: boolean): void;
1641 | }
1642 | export function createSign(algorithm: string): Signer;
1643 | interface Signer extends NodeJS.WritableStream {
1644 | update(data: any): void;
1645 | sign(private_key: string, output_format: string): string;
1646 | }
1647 | export function createVerify(algorith: string): Verify;
1648 | interface Verify extends NodeJS.WritableStream {
1649 | update(data: any): void;
1650 | verify(object: string, signature: string, signature_format?: string): boolean;
1651 | }
1652 | export function createDiffieHellman(prime_length: number): DiffieHellman;
1653 | export function createDiffieHellman(prime: number, encoding?: string): DiffieHellman;
1654 | interface DiffieHellman {
1655 | generateKeys(encoding?: string): string;
1656 | computeSecret(other_public_key: string, input_encoding?: string, output_encoding?: string): string;
1657 | getPrime(encoding?: string): string;
1658 | getGenerator(encoding: string): string;
1659 | getPublicKey(encoding?: string): string;
1660 | getPrivateKey(encoding?: string): string;
1661 | setPublicKey(public_key: string, encoding?: string): void;
1662 | setPrivateKey(public_key: string, encoding?: string): void;
1663 | }
1664 | export function getDiffieHellman(group_name: string): DiffieHellman;
1665 | export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: Buffer) => any): void;
1666 | export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, digest: string, callback: (err: Error, derivedKey: Buffer) => any): void;
1667 | export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) : Buffer;
1668 | export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number, digest: string) : Buffer;
1669 | export function randomBytes(size: number): Buffer;
1670 | export function randomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void;
1671 | export function pseudoRandomBytes(size: number): Buffer;
1672 | export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void;
1673 | }
1674 |
1675 | declare module "stream" {
1676 | import * as events from "events";
1677 |
1678 | export interface Stream extends events.EventEmitter {
1679 | pipe(destination: T, options?: { end?: boolean; }): T;
1680 | }
1681 |
1682 | export interface ReadableOptions {
1683 | highWaterMark?: number;
1684 | encoding?: string;
1685 | objectMode?: boolean;
1686 | }
1687 |
1688 | export class Readable extends events.EventEmitter implements NodeJS.ReadableStream {
1689 | readable: boolean;
1690 | constructor(opts?: ReadableOptions);
1691 | _read(size: number): void;
1692 | read(size?: number): any;
1693 | setEncoding(encoding: string): void;
1694 | pause(): void;
1695 | resume(): void;
1696 | pipe(destination: T, options?: { end?: boolean; }): T;
1697 | unpipe(destination?: T): void;
1698 | unshift(chunk: any): void;
1699 | wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream;
1700 | push(chunk: any, encoding?: string): boolean;
1701 | }
1702 |
1703 | export interface WritableOptions {
1704 | highWaterMark?: number;
1705 | decodeStrings?: boolean;
1706 | objectMode?: boolean;
1707 | }
1708 |
1709 | export class Writable extends events.EventEmitter implements NodeJS.WritableStream {
1710 | writable: boolean;
1711 | constructor(opts?: WritableOptions);
1712 | _write(chunk: any, encoding: string, callback: Function): void;
1713 | write(chunk: any, cb?: Function): boolean;
1714 | write(chunk: any, encoding?: string, cb?: Function): boolean;
1715 | end(): void;
1716 | end(chunk: any, cb?: Function): void;
1717 | end(chunk: any, encoding?: string, cb?: Function): void;
1718 | }
1719 |
1720 | export interface DuplexOptions extends ReadableOptions, WritableOptions {
1721 | allowHalfOpen?: boolean;
1722 | }
1723 |
1724 | // Note: Duplex extends both Readable and Writable.
1725 | export class Duplex extends Readable implements NodeJS.ReadWriteStream {
1726 | writable: boolean;
1727 | constructor(opts?: DuplexOptions);
1728 | _write(chunk: any, encoding: string, callback: Function): void;
1729 | write(chunk: any, cb?: Function): boolean;
1730 | write(chunk: any, encoding?: string, cb?: Function): boolean;
1731 | end(): void;
1732 | end(chunk: any, cb?: Function): void;
1733 | end(chunk: any, encoding?: string, cb?: Function): void;
1734 | }
1735 |
1736 | export interface TransformOptions extends ReadableOptions, WritableOptions {}
1737 |
1738 | // Note: Transform lacks the _read and _write methods of Readable/Writable.
1739 | export class Transform extends events.EventEmitter implements NodeJS.ReadWriteStream {
1740 | readable: boolean;
1741 | writable: boolean;
1742 | constructor(opts?: TransformOptions);
1743 | _transform(chunk: any, encoding: string, callback: Function): void;
1744 | _flush(callback: Function): void;
1745 | read(size?: number): any;
1746 | setEncoding(encoding: string): void;
1747 | pause(): void;
1748 | resume(): void;
1749 | pipe(destination: T, options?: { end?: boolean; }): T;
1750 | unpipe(destination?: T): void;
1751 | unshift(chunk: any): void;
1752 | wrap(oldStream: NodeJS.ReadableStream): NodeJS.ReadableStream;
1753 | push(chunk: any, encoding?: string): boolean;
1754 | write(chunk: any, cb?: Function): boolean;
1755 | write(chunk: any, encoding?: string, cb?: Function): boolean;
1756 | end(): void;
1757 | end(chunk: any, cb?: Function): void;
1758 | end(chunk: any, encoding?: string, cb?: Function): void;
1759 | }
1760 |
1761 | export class PassThrough extends Transform {}
1762 | }
1763 |
1764 | declare module "util" {
1765 | export interface InspectOptions {
1766 | showHidden?: boolean;
1767 | depth?: number;
1768 | colors?: boolean;
1769 | customInspect?: boolean;
1770 | }
1771 |
1772 | export function format(format: any, ...param: any[]): string;
1773 | export function debug(string: string): void;
1774 | export function error(...param: any[]): void;
1775 | export function puts(...param: any[]): void;
1776 | export function print(...param: any[]): void;
1777 | export function log(string: string): void;
1778 | export function inspect(object: any, showHidden?: boolean, depth?: number, color?: boolean): string;
1779 | export function inspect(object: any, options: InspectOptions): string;
1780 | export function isArray(object: any): boolean;
1781 | export function isRegExp(object: any): boolean;
1782 | export function isDate(object: any): boolean;
1783 | export function isError(object: any): boolean;
1784 | export function inherits(constructor: any, superConstructor: any): void;
1785 | export function debuglog(key:string): (msg:string,...param: any[])=>void;
1786 | }
1787 |
1788 | declare module "assert" {
1789 | function internal (value: any, message?: string): void;
1790 | module internal {
1791 | export class AssertionError implements Error {
1792 | name: string;
1793 | message: string;
1794 | actual: any;
1795 | expected: any;
1796 | operator: string;
1797 | generatedMessage: boolean;
1798 |
1799 | constructor(options?: {message?: string; actual?: any; expected?: any;
1800 | operator?: string; stackStartFunction?: Function});
1801 | }
1802 |
1803 | export function fail(actual?: any, expected?: any, message?: string, operator?: string): void;
1804 | export function ok(value: any, message?: string): void;
1805 | export function equal(actual: any, expected: any, message?: string): void;
1806 | export function notEqual(actual: any, expected: any, message?: string): void;
1807 | export function deepEqual(actual: any, expected: any, message?: string): void;
1808 | export function notDeepEqual(acutal: any, expected: any, message?: string): void;
1809 | export function strictEqual(actual: any, expected: any, message?: string): void;
1810 | export function notStrictEqual(actual: any, expected: any, message?: string): void;
1811 | export function deepStrictEqual(actual: any, expected: any, message?: string): void;
1812 | export function notDeepStrictEqual(actual: any, expected: any, message?: string): void;
1813 | export var throws: {
1814 | (block: Function, message?: string): void;
1815 | (block: Function, error: Function, message?: string): void;
1816 | (block: Function, error: RegExp, message?: string): void;
1817 | (block: Function, error: (err: any) => boolean, message?: string): void;
1818 | };
1819 |
1820 | export var doesNotThrow: {
1821 | (block: Function, message?: string): void;
1822 | (block: Function, error: Function, message?: string): void;
1823 | (block: Function, error: RegExp, message?: string): void;
1824 | (block: Function, error: (err: any) => boolean, message?: string): void;
1825 | };
1826 |
1827 | export function ifError(value: any): void;
1828 | }
1829 |
1830 | export = internal;
1831 | }
1832 |
1833 | declare module "tty" {
1834 | import * as net from "net";
1835 |
1836 | export function isatty(fd: number): boolean;
1837 | export interface ReadStream extends net.Socket {
1838 | isRaw: boolean;
1839 | setRawMode(mode: boolean): void;
1840 | }
1841 | export interface WriteStream extends net.Socket {
1842 | columns: number;
1843 | rows: number;
1844 | }
1845 | }
1846 |
1847 | declare module "domain" {
1848 | import * as events from "events";
1849 |
1850 | export class Domain extends events.EventEmitter {
1851 | run(fn: Function): void;
1852 | add(emitter: events.EventEmitter): void;
1853 | remove(emitter: events.EventEmitter): void;
1854 | bind(cb: (err: Error, data: any) => any): any;
1855 | intercept(cb: (data: any) => any): any;
1856 | dispose(): void;
1857 |
1858 | addListener(event: string, listener: Function): Domain;
1859 | on(event: string, listener: Function): Domain;
1860 | once(event: string, listener: Function): Domain;
1861 | removeListener(event: string, listener: Function): Domain;
1862 | removeAllListeners(event?: string): Domain;
1863 | }
1864 |
1865 | export function create(): Domain;
1866 | }
1867 |
1868 | declare module "constants" {
1869 | export var E2BIG: number;
1870 | export var EACCES: number;
1871 | export var EADDRINUSE: number;
1872 | export var EADDRNOTAVAIL: number;
1873 | export var EAFNOSUPPORT: number;
1874 | export var EAGAIN: number;
1875 | export var EALREADY: number;
1876 | export var EBADF: number;
1877 | export var EBADMSG: number;
1878 | export var EBUSY: number;
1879 | export var ECANCELED: number;
1880 | export var ECHILD: number;
1881 | export var ECONNABORTED: number;
1882 | export var ECONNREFUSED: number;
1883 | export var ECONNRESET: number;
1884 | export var EDEADLK: number;
1885 | export var EDESTADDRREQ: number;
1886 | export var EDOM: number;
1887 | export var EEXIST: number;
1888 | export var EFAULT: number;
1889 | export var EFBIG: number;
1890 | export var EHOSTUNREACH: number;
1891 | export var EIDRM: number;
1892 | export var EILSEQ: number;
1893 | export var EINPROGRESS: number;
1894 | export var EINTR: number;
1895 | export var EINVAL: number;
1896 | export var EIO: number;
1897 | export var EISCONN: number;
1898 | export var EISDIR: number;
1899 | export var ELOOP: number;
1900 | export var EMFILE: number;
1901 | export var EMLINK: number;
1902 | export var EMSGSIZE: number;
1903 | export var ENAMETOOLONG: number;
1904 | export var ENETDOWN: number;
1905 | export var ENETRESET: number;
1906 | export var ENETUNREACH: number;
1907 | export var ENFILE: number;
1908 | export var ENOBUFS: number;
1909 | export var ENODATA: number;
1910 | export var ENODEV: number;
1911 | export var ENOENT: number;
1912 | export var ENOEXEC: number;
1913 | export var ENOLCK: number;
1914 | export var ENOLINK: number;
1915 | export var ENOMEM: number;
1916 | export var ENOMSG: number;
1917 | export var ENOPROTOOPT: number;
1918 | export var ENOSPC: number;
1919 | export var ENOSR: number;
1920 | export var ENOSTR: number;
1921 | export var ENOSYS: number;
1922 | export var ENOTCONN: number;
1923 | export var ENOTDIR: number;
1924 | export var ENOTEMPTY: number;
1925 | export var ENOTSOCK: number;
1926 | export var ENOTSUP: number;
1927 | export var ENOTTY: number;
1928 | export var ENXIO: number;
1929 | export var EOPNOTSUPP: number;
1930 | export var EOVERFLOW: number;
1931 | export var EPERM: number;
1932 | export var EPIPE: number;
1933 | export var EPROTO: number;
1934 | export var EPROTONOSUPPORT: number;
1935 | export var EPROTOTYPE: number;
1936 | export var ERANGE: number;
1937 | export var EROFS: number;
1938 | export var ESPIPE: number;
1939 | export var ESRCH: number;
1940 | export var ETIME: number;
1941 | export var ETIMEDOUT: number;
1942 | export var ETXTBSY: number;
1943 | export var EWOULDBLOCK: number;
1944 | export var EXDEV: number;
1945 | export var WSAEINTR: number;
1946 | export var WSAEBADF: number;
1947 | export var WSAEACCES: number;
1948 | export var WSAEFAULT: number;
1949 | export var WSAEINVAL: number;
1950 | export var WSAEMFILE: number;
1951 | export var WSAEWOULDBLOCK: number;
1952 | export var WSAEINPROGRESS: number;
1953 | export var WSAEALREADY: number;
1954 | export var WSAENOTSOCK: number;
1955 | export var WSAEDESTADDRREQ: number;
1956 | export var WSAEMSGSIZE: number;
1957 | export var WSAEPROTOTYPE: number;
1958 | export var WSAENOPROTOOPT: number;
1959 | export var WSAEPROTONOSUPPORT: number;
1960 | export var WSAESOCKTNOSUPPORT: number;
1961 | export var WSAEOPNOTSUPP: number;
1962 | export var WSAEPFNOSUPPORT: number;
1963 | export var WSAEAFNOSUPPORT: number;
1964 | export var WSAEADDRINUSE: number;
1965 | export var WSAEADDRNOTAVAIL: number;
1966 | export var WSAENETDOWN: number;
1967 | export var WSAENETUNREACH: number;
1968 | export var WSAENETRESET: number;
1969 | export var WSAECONNABORTED: number;
1970 | export var WSAECONNRESET: number;
1971 | export var WSAENOBUFS: number;
1972 | export var WSAEISCONN: number;
1973 | export var WSAENOTCONN: number;
1974 | export var WSAESHUTDOWN: number;
1975 | export var WSAETOOMANYREFS: number;
1976 | export var WSAETIMEDOUT: number;
1977 | export var WSAECONNREFUSED: number;
1978 | export var WSAELOOP: number;
1979 | export var WSAENAMETOOLONG: number;
1980 | export var WSAEHOSTDOWN: number;
1981 | export var WSAEHOSTUNREACH: number;
1982 | export var WSAENOTEMPTY: number;
1983 | export var WSAEPROCLIM: number;
1984 | export var WSAEUSERS: number;
1985 | export var WSAEDQUOT: number;
1986 | export var WSAESTALE: number;
1987 | export var WSAEREMOTE: number;
1988 | export var WSASYSNOTREADY: number;
1989 | export var WSAVERNOTSUPPORTED: number;
1990 | export var WSANOTINITIALISED: number;
1991 | export var WSAEDISCON: number;
1992 | export var WSAENOMORE: number;
1993 | export var WSAECANCELLED: number;
1994 | export var WSAEINVALIDPROCTABLE: number;
1995 | export var WSAEINVALIDPROVIDER: number;
1996 | export var WSAEPROVIDERFAILEDINIT: number;
1997 | export var WSASYSCALLFAILURE: number;
1998 | export var WSASERVICE_NOT_FOUND: number;
1999 | export var WSATYPE_NOT_FOUND: number;
2000 | export var WSA_E_NO_MORE: number;
2001 | export var WSA_E_CANCELLED: number;
2002 | export var WSAEREFUSED: number;
2003 | export var SIGHUP: number;
2004 | export var SIGINT: number;
2005 | export var SIGILL: number;
2006 | export var SIGABRT: number;
2007 | export var SIGFPE: number;
2008 | export var SIGKILL: number;
2009 | export var SIGSEGV: number;
2010 | export var SIGTERM: number;
2011 | export var SIGBREAK: number;
2012 | export var SIGWINCH: number;
2013 | export var SSL_OP_ALL: number;
2014 | export var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
2015 | export var SSL_OP_CIPHER_SERVER_PREFERENCE: number;
2016 | export var SSL_OP_CISCO_ANYCONNECT: number;
2017 | export var SSL_OP_COOKIE_EXCHANGE: number;
2018 | export var SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
2019 | export var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
2020 | export var SSL_OP_EPHEMERAL_RSA: number;
2021 | export var SSL_OP_LEGACY_SERVER_CONNECT: number;
2022 | export var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
2023 | export var SSL_OP_MICROSOFT_SESS_ID_BUG: number;
2024 | export var SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
2025 | export var SSL_OP_NETSCAPE_CA_DN_BUG: number;
2026 | export var SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
2027 | export var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
2028 | export var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
2029 | export var SSL_OP_NO_COMPRESSION: number;
2030 | export var SSL_OP_NO_QUERY_MTU: number;
2031 | export var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
2032 | export var SSL_OP_NO_SSLv2: number;
2033 | export var SSL_OP_NO_SSLv3: number;
2034 | export var SSL_OP_NO_TICKET: number;
2035 | export var SSL_OP_NO_TLSv1: number;
2036 | export var SSL_OP_NO_TLSv1_1: number;
2037 | export var SSL_OP_NO_TLSv1_2: number;
2038 | export var SSL_OP_PKCS1_CHECK_1: number;
2039 | export var SSL_OP_PKCS1_CHECK_2: number;
2040 | export var SSL_OP_SINGLE_DH_USE: number;
2041 | export var SSL_OP_SINGLE_ECDH_USE: number;
2042 | export var SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
2043 | export var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
2044 | export var SSL_OP_TLS_BLOCK_PADDING_BUG: number;
2045 | export var SSL_OP_TLS_D5_BUG: number;
2046 | export var SSL_OP_TLS_ROLLBACK_BUG: number;
2047 | export var ENGINE_METHOD_DSA: number;
2048 | export var ENGINE_METHOD_DH: number;
2049 | export var ENGINE_METHOD_RAND: number;
2050 | export var ENGINE_METHOD_ECDH: number;
2051 | export var ENGINE_METHOD_ECDSA: number;
2052 | export var ENGINE_METHOD_CIPHERS: number;
2053 | export var ENGINE_METHOD_DIGESTS: number;
2054 | export var ENGINE_METHOD_STORE: number;
2055 | export var ENGINE_METHOD_PKEY_METHS: number;
2056 | export var ENGINE_METHOD_PKEY_ASN1_METHS: number;
2057 | export var ENGINE_METHOD_ALL: number;
2058 | export var ENGINE_METHOD_NONE: number;
2059 | export var DH_CHECK_P_NOT_SAFE_PRIME: number;
2060 | export var DH_CHECK_P_NOT_PRIME: number;
2061 | export var DH_UNABLE_TO_CHECK_GENERATOR: number;
2062 | export var DH_NOT_SUITABLE_GENERATOR: number;
2063 | export var NPN_ENABLED: number;
2064 | export var RSA_PKCS1_PADDING: number;
2065 | export var RSA_SSLV23_PADDING: number;
2066 | export var RSA_NO_PADDING: number;
2067 | export var RSA_PKCS1_OAEP_PADDING: number;
2068 | export var RSA_X931_PADDING: number;
2069 | export var RSA_PKCS1_PSS_PADDING: number;
2070 | export var POINT_CONVERSION_COMPRESSED: number;
2071 | export var POINT_CONVERSION_UNCOMPRESSED: number;
2072 | export var POINT_CONVERSION_HYBRID: number;
2073 | export var O_RDONLY: number;
2074 | export var O_WRONLY: number;
2075 | export var O_RDWR: number;
2076 | export var S_IFMT: number;
2077 | export var S_IFREG: number;
2078 | export var S_IFDIR: number;
2079 | export var S_IFCHR: number;
2080 | export var S_IFLNK: number;
2081 | export var O_CREAT: number;
2082 | export var O_EXCL: number;
2083 | export var O_TRUNC: number;
2084 | export var O_APPEND: number;
2085 | export var F_OK: number;
2086 | export var R_OK: number;
2087 | export var W_OK: number;
2088 | export var X_OK: number;
2089 | export var UV_UDP_REUSEADDR: number;
2090 | }
2091 |
--------------------------------------------------------------------------------