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:
Frederic Junod
2018-09-18 13:57:28 +02:00
parent 5910e4d207
commit 7cb85fa975
7 changed files with 75 additions and 76 deletions

View File

@@ -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;