Documenting callback parameters using Google Closure Compiler
问题 How can you document names and descriptions of callback parameters using the Google Closure Compiler? After reading this answer on documenting callbacks with JSDoc, I tried using @callback and @typedef and @name tags, but ran into issues with each one. With @callback , Closure gives an "illegal use of unknown JSDoc tag" warning: /** * @callback EndDrawCallback * @param {string} action - either "keep", "discard", or "cancel" * @param {boolean} saveChanges - whether to mark changes as saved **/