Skip to content

Commit

Permalink
Small JSDoc normalization/fixes (playcanvas#6369)
Browse files Browse the repository at this point in the history
* Fix/normalize examples/utils/plugins/rollup-copy-static.mjs, targets#once is optional

* Mark `y`/`z` as optional when `x` can be the entire `Vec3`
  • Loading branch information
kungfooman authored May 15, 2024
1 parent 4075e5b commit d16e78f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion examples/utils/plugins/rollup-copy-static.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ const copied = new Set();
* This plugin copies static files from source to destination.
*
* @param {string} nodeEnv - The node environment.
* @param {{ src: string, dest: string, once: boolean }[]} targets - Array of source and destination objects.
* @param {object[]} targets - Array of source and destination objects.
* @param {string} targets.src - File or entire dir.
* @param {string} targets.dest - File or entire dir, usually into `dist/`.
* @param {boolean} [targets.once] - Copy files only once for speed-up (external libs).
* @param {boolean} log - Log the copy status.
* @returns {import('rollup').Plugin} The plugin.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/framework/components/element/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -1735,8 +1735,8 @@ class ElementComponent extends Component {
* Patched method for setting the position.
*
* @param {number|Vec3} x - The x coordinate or Vec3
* @param {number} y - The y coordinate
* @param {number} z - The z coordinate
* @param {number} [y] - The y coordinate
* @param {number} [z] - The z coordinate
* @private
*/
_setPosition(x, y, z) {
Expand Down Expand Up @@ -1764,8 +1764,8 @@ class ElementComponent extends Component {
* Patched method for setting the local position.
*
* @param {number|Vec3} x - The x coordinate or Vec3
* @param {number} y - The y coordinate
* @param {number} z - The z coordinate
* @param {number} [y] - The y coordinate
* @param {number} [z] - The z coordinate
* @private
*/
_setLocalPosition(x, y, z) {
Expand Down

0 comments on commit d16e78f

Please sign in to comment.