Repository navigation
Feature/add promise doc - #2040
Conversation
|
hey @bajtos take your time to review it :) Some questions:
But doc page looks fine:
|
@hacksparrow could you PTAL? |
According to jsdoc, OTOH, Google Closure Compiler uses @hacksparrow do you happen to know why "promise annotation cannot read Array with datatype like Change[] from callback"? Is this something that can be fixed in strong-docs? |
| * @param {Object} options Other options | ||
| * @param {Function} callback Callback function | ||
| * @callback {Function} callback Callback function | ||
| * @param {Error} err |
There was a problem hiding this comment.
@hacksparrow Is it necessary to add @param {Error} err to callbacks that have at most one argument? I.e. cb(err) on error, cb() on success.
I would prefer if strong-docs was able to add this automatically.
There was a problem hiding this comment.
@bajtos In my opinion, we should make it explicit. Reasons:
- Helps to give more details about the error, if required.
- When a human being looks at the source code, if the error param is missing, it will be interpreted as the callback returns nothing. Only
sdocswill be able to add the missing info. We should avoid magic.
|
@jannyHou the changes look good to me so far. Please let me know when this is no longer "work in progress". |
|
@bajtos Thanks for reviewing so quickly, and sorry I put work in progress when I created it but forgot to delete them :) it's done now excepts the problem I mentioned above. |
|
@jannyHou LGTM. Please rebase on top of the current master and squash the commits before landing. |
361da1f to
e529dd2
Compare
Add promise jsdoc in loopback
e529dd2 to
eb09681
Compare
Connect to #1998