Skip to content

Commit

Permalink
fix(types): make some arguments optional (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
makepanic authored Mar 19, 2024
1 parent 03a26d8 commit 34987ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/features/auto-place/AutoPlace.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default function AutoPlace(eventBus, modeling, canvas) {
*
* @param {Shape} source
* @param {Shape} shape
* @param {any} [hints={}]
*
* @return {Shape} appended shape
*/
Expand Down
5 changes: 5 additions & 0 deletions lib/features/create/Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ export default function Create(

// API //////////

/**
* @param event
* @param elements
* @param {any} [context={}]
*/
this.start = function(event, elements, context) {
if (!isArray(elements)) {
elements = [ elements ];
Expand Down
4 changes: 2 additions & 2 deletions lib/navigation/zoomscroll/ZoomScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ ZoomScroll.prototype._handleWheel = function handleWheel(event) {
* Zoom with fixed step size.
*
* @param {number} delta Zoom delta (1 for zooming in, -1 for zooming out).
* @param {Point} position
* @param {Point} [position]
*/
ZoomScroll.prototype.stepZoom = function stepZoom(delta, position) {

Expand All @@ -193,7 +193,7 @@ ZoomScroll.prototype.stepZoom = function stepZoom(delta, position) {
* Zoom in/out given a step size.
*
* @param {number} delta
* @param {Point} position
* @param {Point} [position]
* @param {number} stepSize
*/
ZoomScroll.prototype._zoom = function(delta, position, stepSize) {
Expand Down
2 changes: 1 addition & 1 deletion lib/util/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function getHelperSvg() {
/**
* Creates a new label utility
*
* @param {TextConfig} config
* @param {TextConfig} [config]
*/
export default function Text(config) {

Expand Down

0 comments on commit 34987ca

Please sign in to comment.