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

Commit 25d3a22

Browse files
committed
Add missing arguments for function types
Several uses of function types lacked parameters, resulting in errors such as the following: assert.js:117: WARNING - Bad type annotation. missing opening ( * @param {function} block ^ Fix these by adding argument types. Signed-off-by: Kevin Locke <[email protected]>
1 parent 4574d6d commit 25d3a22

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

cluster.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cluster.setupMaster = function(settings) {};
6565
cluster.fork = function(env) {};
6666

6767
/**
68-
* @param {function=} callback
68+
* @param {function()=} callback
6969
*/
7070
cluster.disconnect = function(callback) {};
7171

domain.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ domain.create = function() {};
4444
domain.Domain = function() {};
4545

4646
/**
47-
* @param {function} fn
47+
* @param {function()} fn
4848
*/
4949
domain.Domain.prototype.run = function(fn) {};
5050

@@ -64,14 +64,14 @@ domain.Domain.prototype.add = function(emitter) {};
6464
domain.Domain.prototype.remove = function(emitter) {};
6565

6666
/**
67-
* @param {function} callback
68-
* @return {function}
67+
* @param {function(...[*])} callback
68+
* @return {function(...[*])}
6969
*/
7070
domain.Domain.prototype.bind = function(callback) {};
7171

7272
/**
73-
* @param {function} callback
74-
* @return {function}
73+
* @param {function(...[*])} callback
74+
* @return {function(...[*])}
7575
*/
7676
domain.Domain.prototype.intercept = function(callback) {};
7777

fs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ fs.watchFile = function(filename, options, listener) {};
459459

460460
/**
461461
* @param {string} filename
462-
* @param {function=} listener
462+
* @param {function(string, string)=} listener
463463
*/
464464
fs.unwatchFile = function(filename, listener) {};
465465

https.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ https.Server = function() {};
4141
https.Server.prototype.listen = function(var_args) {};
4242

4343
/**
44-
* @param {function} callback
44+
* @param {function()=} callback
4545
*/
4646
https.Server.prototype.close = function(callback) {};
4747

process.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ process.platform;
147147
process.memoryUsage = function() {};
148148

149149
/**
150-
* @param {!function} callback
150+
* @param {!function()} callback
151151
*/
152152
process.nextTick = function(callback) {};
153153

readline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
var readline = {};
3434

3535
/**
36-
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function=), terminal: boolean}} options
36+
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function(*, Array)=), terminal: boolean}} options
3737
* @return {readline.Interface}
3838
*/
3939
readline.createInterface = function(options) {};

stdio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
/**
25-
* @type {Object.<string,function>}
25+
* @type {Object.<string,function(*, ...[*])>}
2626
*/
2727
var console = {};
2828

stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ stream.Transform = function(options) {};
226226
/**
227227
* @param {string|buffer.Buffer} chunk
228228
* @param {*} output
229-
* @param {function} cb
229+
* @param {function(*=)} cb
230230
*/
231231
stream.Transform._transform = function(chunk, output, cb) {};
232232

0 commit comments

Comments
 (0)