Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Commit 206192f

Browse files
author
Daniel Wirtz
committed
The way to completeness...
1 parent f8b8a3c commit 206192f

File tree

17 files changed

+1266
-37
lines changed

17 files changed

+1266
-37
lines changed

child_process.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* @fileoverview Definitions for node's child_process module. Depends on the events module.
1919
* @see http://nodejs.org/api/child_process.html
20+
* @see https://github.com/joyent/node/blob/master/lib/child_process.js
2021
* @externs
2122
* @author Daniel Wirtz <[email protected]>
2223
*/

cluster.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/**
1818
* @fileoverview Definitions for node's cluster module. Depends on the events module.
1919
* @see http://nodejs.org/api/cluster.html
20+
* @see https://github.com/joyent/node/blob/master/lib/cluster.js
2021
* @externs
2122
* @author Daniel Wirtz <[email protected]>
2223
*/
@@ -74,7 +75,7 @@ cluster.disconnect = function(callback) {};
7475
cluster.worker;
7576

7677
/**
77-
* @type {Object.<string,cluster.Worker>}
78+
* @type {?Object.<string,cluster.Worker>}
7879
*/
7980
cluster.workers;
8081

crypto.js

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*
2+
* Copyright 2012 The Closure Compiler Authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* @fileoverfiew Definitions for node's crypto module.
19+
* @see http://nodejs.org/api/crypto.html
20+
* @see https://github.com/joyent/node/blob/master/lib/crypto.js
21+
* @externs
22+
* @author Daniel Wirtz <[email protected]>
23+
*/
24+
25+
/**
26+
BEGIN_NODE_INCLUDE
27+
var crypto = require('crypto');
28+
END_NODE_INCLUDE
29+
*/
30+
31+
/**
32+
* @type {Object.<string,*>}
33+
*/
34+
var crypto = {};
35+
36+
/**
37+
* @typedef {{pfx: string|buffer.Buffer, key: string|buffer.Buffer, passphrase: string, cert: string|buffer.Buffer, ca: Array.<string|buffer.Buffer>, crl: string|Array.<string>, ciphers: string}}
38+
*/
39+
crypto.Credentials;
40+
41+
/**
42+
* @param {Object.<string,string>=} details
43+
* @return {crypto.Credentials}
44+
*/
45+
crypto.createCredentials = function(details) {};
46+
47+
/**
48+
* @param {string} algorithm
49+
* @return {crypto.Hash}
50+
*/
51+
crypto.createHash = function(algorithm) {};
52+
53+
/**
54+
* @param {string} algorithm
55+
* @param {Object} options
56+
* @constructor
57+
*/
58+
crypto.Hash = function(algorithm, options) {};
59+
60+
/**
61+
* @param {string|buffer.Buffer} data
62+
* @param {string=} input_encoding
63+
*/
64+
crypto.Hash.prototype.update = function(data, input_encoding) {};
65+
66+
/**
67+
* @param {string=} encoding
68+
* @return {string}
69+
*/
70+
crypto.Hash.prototype.digest = function(encoding) {};
71+
72+
/**
73+
* @param {string} algorithm
74+
* @param {string|buffer.Buffer} key
75+
* @return {crypto.Hmac}
76+
*/
77+
crypto.createHmac = function(algorithm, key) {};
78+
79+
/**
80+
* @param {string} hmac
81+
* @param {string|buffer.Buffer} key
82+
* @param {Object} options
83+
* @constructor
84+
*/
85+
crypto.Hmac = function(hmac, key, options) {};
86+
87+
/**
88+
* @param {string|buffer.Buffer} data
89+
*/
90+
crypto.Hmac.prototype.update = function(data) {};
91+
92+
/**
93+
* @param {string} encoding
94+
*/
95+
crypto.Hmac.prototype.digest = function(encoding) {};
96+
97+
// TODO: Finish...

dgram.js

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
/*
2+
* Copyright 2012 The Closure Compiler Authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* @fileoverview Definitions for node's dgram module. Depends on the events module.
19+
* @see http://nodejs.org/api/dgram.html
20+
* @see https://github.com/joyent/node/blob/master/lib/dgram.js
21+
* @externs
22+
* @author Daniel Wirtz <[email protected]>
23+
*/
24+
25+
/**
26+
BEGIN_NODE_INCLUDE
27+
var dgram = require('dgram');
28+
END_NODE_INCLUDE
29+
*/
30+
31+
/**
32+
* @type {Object.<string,*>}
33+
*/
34+
var dgram = {};
35+
36+
/**
37+
* @param {string} type
38+
* @param {function(...)=} callback
39+
* @return {dgram.Socket}
40+
*/
41+
dgram.createSocket = function(type, callback) {};
42+
43+
/**
44+
* @constructor
45+
* @extends events.EventEmitter
46+
*/
47+
dgram.Socket = function() {};
48+
49+
/**
50+
* @param {buffer.Buffer} buf
51+
* @param {number} offset
52+
* @param {number} length
53+
* @param {number} port
54+
* @param {string} address
55+
* @param {function(...)=} callback
56+
*/
57+
dgram.Socket.prototype.send = function(buf, offset, length, port, address, callback) {};
58+
59+
/**
60+
* @param {number} port
61+
* @param {string=} address
62+
*/
63+
dgram.Socket.prototype.bind = function(port, address) {};
64+
65+
/**
66+
*/
67+
dgram.Socket.prototype.close = function() {};
68+
69+
/**
70+
* @return {string}
71+
*/
72+
dgram.Socket.prototype.address = function() {};
73+
74+
/**
75+
* @param {boolean} flag
76+
*/
77+
dgram.Socket.prototype.setBroadcast = function(flag) {};
78+
79+
/**
80+
* @param {number} ttl
81+
* @return {number}
82+
*/
83+
dgram.Socket.prototype.setTTL = function(ttl) {};
84+
85+
/**
86+
* @param {number} ttl
87+
* @return {number}
88+
*/
89+
dgram.Socket.prototype.setMulticastTTL = function(ttl) {};
90+
91+
/**
92+
* @param {boolean} flag
93+
*/
94+
dgram.Socket.prototype.setMulticastLoopback = function(flag) {};
95+
96+
/**
97+
* @param {string} multicastAddress
98+
* @param {string=} multicastInterface
99+
*/
100+
dgram.Socket.prototype.addMembership = function(multicastAddress, multicastInterface) {};
101+
102+
/**
103+
* @param {string} multicastAddress
104+
* @param {string=} multicastInterface
105+
*/
106+
dgram.Socket.prototype.dropMembership = function(multicastAddress, multicastInterface) {};

0 commit comments

Comments
 (0)