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:
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
import BaseObject from '../Object.js';
|
||||
import {createEmpty, getHeight, returnOrUpdate} from '../extent.js';
|
||||
import {FALSE} from '../functions.js';
|
||||
import {transform2D} from '../geom/flat/transform.js';
|
||||
import {get as getProjection, getTransform} from '../proj.js';
|
||||
import Units from '../proj/Units.js';
|
||||
@@ -82,6 +81,15 @@ class Geometry extends BaseObject {
|
||||
*/
|
||||
closestPointXY(x, y, closestPoint, minSquaredDistance) {}
|
||||
|
||||
/**
|
||||
* @param {number} x X.
|
||||
* @param {number} y Y.
|
||||
* @return {boolean} Contains (x, y).
|
||||
*/
|
||||
containsXY(x, y) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the closest point of the geometry to the passed point as
|
||||
* {@link module:ol/coordinate~Coordinate coordinate}.
|
||||
@@ -248,12 +256,4 @@ class Geometry extends BaseObject {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} x X.
|
||||
* @param {number} y Y.
|
||||
* @return {boolean} Contains (x, y).
|
||||
*/
|
||||
Geometry.prototype.containsXY = FALSE;
|
||||
|
||||
|
||||
export default Geometry;
|
||||
|
||||
Reference in New Issue
Block a user