I have a method in a module. It takes an object that is an instance of a very specific class. For example:
/** Validate a unit against the database's list of valid units
* @param {Object} db - ???
* @param {string} unit - unit to validate
* @returns {Promise} Promise to query unit validation
*/
validateUnit: (db, unit) => {
return new Promise((resolve, reject) => {
I want to make it very clear that the db parameter is a Knex object as returned from require('knex')({...})
.