Don't define functions in the prototype
If `VOID` is used, TypeScript is not able to figure out what the function parameters are.
Before:
```
$ npx tsc | wc -l
1188
```
After:
```
$ npx tsc | wc -l
1169
```
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
* @module ol/source/Tile
|
||||
*/
|
||||
|
||||
import {VOID} from '../functions.js';
|
||||
import TileCache from '../TileCache.js';
|
||||
import TileState from '../TileState.js';
|
||||
import Event from '../events/Event.js';
|
||||
@@ -291,19 +290,20 @@ class TileSource extends Source {
|
||||
this.tileCache.clear();
|
||||
this.changed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* Marks a tile coord as being used, without triggering a load.
|
||||
* @param {number} z Tile coordinate z.
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
* @param {import("../proj/Projection.js").default} projection Projection.
|
||||
*/
|
||||
useTile(z, x, y, projection) {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Marks a tile coord as being used, without triggering a load.
|
||||
* @param {number} z Tile coordinate z.
|
||||
* @param {number} x Tile coordinate x.
|
||||
* @param {number} y Tile coordinate y.
|
||||
* @param {import("../proj/Projection.js").default} projection Projection.
|
||||
*/
|
||||
TileSource.prototype.useTile = VOID;
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this
|
||||
|
||||
Reference in New Issue
Block a user