documentation/__tests__/fixture/simple-callback.input.js
David Halls 61968c790f fix: Show () for callbacks
* Show callback signatures

* Add output test for callback

* Reformat is_function

* Fix comparator

* Use camelCase #818
2017-06-23 15:41:21 -04:00

19 lines
396 B
JavaScript

/**
* This takes a number and a callback and calls the callback with the number
* plus 3.
*
* @param {Number} n - The number.
* @param {simpleCallback} cb - The callback.
*/
function takesSimpleCallback(n, cb) {
cb(null, n + 3);
}
/**
* This callback takes an error and a number.
*
* @callback simpleCallback
* @param {?Error} err - The error.
* @param {Number} n - The number.
*/