Mark optional property with square brackets

This commit is contained in:
Frederic Junod
2018-03-15 15:20:01 +01:00
parent 218ca38f1d
commit 8a4d60192f
12 changed files with 36 additions and 45 deletions

View File

@@ -35,10 +35,8 @@ import EventType from './events/EventType.js';
/**
* @typedef {Object} Options
* @property {number|undefined} transition A duration for tile opacity
* transitions. By default, tiles will render with an opacity transition that
* lasts 250 ms. To change the duration, pass a number in milliseconds. A
* duration of 0 disables the opacity transition.
* @property {number} [transition=250] A duration for tile opacity
* transitions in milliseconds. A duration of 0 disables the opacity transition.
* @api
*/
@@ -90,8 +88,7 @@ const Tile = function(tileCoord, state, opt_options) {
* The duration for the opacity transition.
* @type {number}
*/
this.transition_ = options.transition === undefined ?
250 : options.transition;
this.transition_ = options.transition === undefined ? 250 : options.transition;
/**
* Lookup of start times for rendering transitions. If the start time is