Say I have this function:
function func(someObject){ ... }
What's the correct way to tell the consumer what the contents of "someObject" are? Is this something I should even worry about?
I was thinking that I should at least describe the input object in the module description. Is that okay?
EDIT: I just want to know the correct pattern to avoid confusion. I know javascript is dynamically typed.
EDIT2: I want people on my team to be able to know the arguments within an object without having to go to through the code.
EDIT3: Is the correct way to add that information above the function in a comment or to add it to a package specific readme?
EDIT3: It seems like the thing I was looking for was JSDOC:
/**
* Represents a book.
* @constructor
* @param {string} title - The title of the book.
* @param {string} author - The author of the book.
*/
function Book(title, author) {
}