File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,32 @@ optional parameters::
98
98
99
99
.. js:autofunction:: someFunction(foo, bar[, baz])
100
100
101
+ Parametter's properties and destructuring parameters can also be documented::
102
+
103
+ /**
104
+ * Export an image from the given canvas and save it to the disk.
105
+ *
106
+ * @param {string} filename The name of the output file.
107
+ * @param {Object} options Output options.
108
+ * @param {string} options.format The output format (``jpeg``, ``png`` or ``webp``).
109
+ * @param {number} options.quality The output quality when format is ``jpeg`` or ``webp`` (from ``0.00`` to ``1.00``).
110
+ */
111
+ function saveCanvas(filename, options) {
112
+ // ...
113
+ }
114
+
115
+ /**
116
+ * Export an image from the given canvas and save it to the disk.
117
+ *
118
+ * @param {string} filename The name of the output file.
119
+ * @param {Object} options Output options.
120
+ * @param {string} options.format The output format (``jpeg``, ``png`` or ``webp``).
121
+ * @param {number} options.quality The output quality when format is ``jpeg`` or ``webp`` (from ``0.00`` to ``1.00``).
122
+ */
123
+ function saveCanvas(filename, { format, quality }) {
124
+ // ...
125
+ }
126
+
101
127
You can even add additional content. If you do, it will appear just below any extracted documentation::
102
128
103
129
.. js:autofunction:: someFunction
You can’t perform that action at this time.
0 commit comments