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

Commit

Permalink
Add missing arguments for function types
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kevinoid committed Apr 12, 2013
1 parent 4574d6d commit 25d3a22
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ cluster.setupMaster = function(settings) {};
cluster.fork = function(env) {};

/**
* @param {function=} callback
* @param {function()=} callback
*/
cluster.disconnect = function(callback) {};

Expand Down
10 changes: 5 additions & 5 deletions domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ domain.create = function() {};
domain.Domain = function() {};

/**
* @param {function} fn
* @param {function()} fn
*/
domain.Domain.prototype.run = function(fn) {};

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

/**
* @param {function} callback
* @return {function}
* @param {function(...[*])} callback
* @return {function(...[*])}
*/
domain.Domain.prototype.bind = function(callback) {};

/**
* @param {function} callback
* @return {function}
* @param {function(...[*])} callback
* @return {function(...[*])}
*/
domain.Domain.prototype.intercept = function(callback) {};

Expand Down
2 changes: 1 addition & 1 deletion fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ fs.watchFile = function(filename, options, listener) {};

/**
* @param {string} filename
* @param {function=} listener
* @param {function(string, string)=} listener
*/
fs.unwatchFile = function(filename, listener) {};

Expand Down
2 changes: 1 addition & 1 deletion https.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ https.Server = function() {};
https.Server.prototype.listen = function(var_args) {};

/**
* @param {function} callback
* @param {function()=} callback
*/
https.Server.prototype.close = function(callback) {};

Expand Down
2 changes: 1 addition & 1 deletion process.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ process.platform;
process.memoryUsage = function() {};

/**
* @param {!function} callback
* @param {!function()} callback
*/
process.nextTick = function(callback) {};

Expand Down
2 changes: 1 addition & 1 deletion readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
var readline = {};

/**
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function=), terminal: boolean}} options
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function(*, Array)=), terminal: boolean}} options
* @return {readline.Interface}
*/
readline.createInterface = function(options) {};
Expand Down
2 changes: 1 addition & 1 deletion stdio.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/

/**
* @type {Object.<string,function>}
* @type {Object.<string,function(*, ...[*])>}
*/
var console = {};

Expand Down
2 changes: 1 addition & 1 deletion stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ stream.Transform = function(options) {};
/**
* @param {string|buffer.Buffer} chunk
* @param {*} output
* @param {function} cb
* @param {function(*=)} cb
*/
stream.Transform._transform = function(chunk, output, cb) {};

Expand Down

0 comments on commit 25d3a22

Please sign in to comment.