Throw when calling abstract methods; fix abstract return types

This commit is contained in:
ahocevar
2018-10-30 18:45:42 +01:00
parent 2adac0b3e7
commit 1cdd040c96
22 changed files with 273 additions and 85 deletions

View File

@@ -1,6 +1,8 @@
/**
* @module ol/render/ReplayGroup
*/
import {abstract} from '../util.js';
/**
* Base class for replay groups.
*/
@@ -11,20 +13,26 @@ class ReplayGroup {
* @param {import("./ReplayType.js").default} replayType Replay type.
* @return {import("./VectorContext.js").default} Replay.
*/
getReplay(zIndex, replayType) {}
getReplay(zIndex, replayType) {
return abstract();
}
/**
* @abstract
* @return {boolean} Is empty.
*/
isEmpty() {}
isEmpty() {
return abstract();
}
/**
* @abstract
* @param {boolean} group Group with previous replay
* @return {Array<*>} The resulting instruction group
*/
addDeclutter(group) {}
addDeclutter(group) {
return abstract();
}
}
export default ReplayGroup;