Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
433 views
in Technique[技术] by (71.8m points)

javascript - 如何在jsdoc中描述“对象”参数?(How to describe “object” arguments in jsdoc?)

// My function does X and Y.
// @params {object} parameters An object containing the parameters
// @params {function} callback The callback function
function(parameters, callback) {
}

But how do I describe how the parameters object should be structured?

(但是,我如何描述参数对象应该如何构造?)

For example it should be something like:

(例如,它应该是这样的:)

{
  setting1 : 123, // (required, integer)
  setting2 : 'asdf' // (optional, string)
}
  ask by Andy Hin translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...