Cast empty optional options in constructor
To remove the typescript errors:
```
Property 'xxx' does not exist on type '{}'
```
This commit is contained in:
@@ -615,7 +615,7 @@ class PluggableMap extends BaseObject {
|
|||||||
if (!this.frameState_) {
|
if (!this.frameState_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const options = opt_options || {};
|
const options = opt_options || /** @type {module:ol/PluggableMap~AtPixelOptions} */ ({});
|
||||||
const hitTolerance = options.hitTolerance !== undefined ?
|
const hitTolerance = options.hitTolerance !== undefined ?
|
||||||
opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
|
opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
|
||||||
const layerFilter = options.layerFilter || TRUE;
|
const layerFilter = options.layerFilter || TRUE;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class ImageArcGISRest extends ImageSource {
|
|||||||
*/
|
*/
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || /** @type {module:ol/source/ImageArcGISRest~Options} */ ({});
|
||||||
|
|
||||||
super({
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class ImageWMS extends ImageSource {
|
|||||||
*/
|
*/
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || /** @type {module:ol/source/ImageWMS~Options} */ ({});
|
||||||
|
|
||||||
super({
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class TileWMS extends TileImage {
|
|||||||
*/
|
*/
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || /** @type {module:ol/source/TileWMS~Options} */ ({});
|
||||||
|
|
||||||
const params = options.params || {};
|
const params = options.params || {};
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class CircleStyle extends RegularShape {
|
|||||||
*/
|
*/
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || /** @type {module:ol/style/Circle~Options} */ ({});
|
||||||
|
|
||||||
super({
|
super({
|
||||||
points: Infinity,
|
points: Infinity,
|
||||||
|
|||||||
Reference in New Issue
Block a user