Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 417 Bytes

File metadata and controls

21 lines (18 loc) · 417 Bytes

@callback Back

The @callback tag is mainly used for specified callback function that can be passed to other functions.

/**
 * other function
 * @param {otherCallback} cb - a callback method
 */
function other(cb) {
    /** ... */
    cb(200, 'Success');
}

/**
 * The callback for calling other methods
 * @callback otherCallback
 * @param {number} code
 * @param {string} message
 */