Use extends and super for AssertionError

This commit is contained in:
ahocevar
2018-07-17 11:45:50 +02:00
parent 540b1793e7
commit 0224e2b3c5

View File

@@ -1,7 +1,7 @@
/**
* @module ol/AssertionError
*/
import {VERSION, inherits} from './util.js';
import {VERSION} from './util.js';
/**
* Error object thrown when an assertion failed. This is an ECMA-262 Error,
@@ -9,7 +9,7 @@ import {VERSION, inherits} from './util.js';
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}
* @extends {Error}
*/
class AssertionError {
class AssertionError extends Error {
/**
* @param {number} code Error code.
@@ -42,6 +42,4 @@ class AssertionError {
}
inherits(AssertionError, Error);
export default AssertionError;