function dilate (width) {
  if (!is.defined(width)) {
    this.options.dilateWidth = 1;
  } else if (is.integer(width) && width > 0) {
    this.options.dilateWidth = width;
  } else {
    throw is.invalidParameterError('dilate', 'positive integer', dilate);
  }
  return this;
}
Expand foreground objects using the dilate morphological operator.

@example
const output = await sharp(input)
  .dilate()
  .toBuffer();

@param {Number} [width=1] dilation width in pixels.
@returns {Sharp}
@throws {Error} Invalid parameters