Merge pull request #9157 from fredj/rm_inherits

Remove deprecated inherits function
This commit is contained in:
Frédéric Junod
2019-01-28 11:01:07 +01:00
committed by GitHub
4 changed files with 7 additions and 31 deletions

View File

@@ -30,5 +30,4 @@ export {default as VectorRenderTile} from './VectorRenderTile.js';
export {default as VectorTile} from './VectorTile.js';
export {default as View} from './View.js';
export {getUid, inherits, VERSION} from './util.js';
export {getUid, VERSION} from './util.js';

View File

@@ -11,34 +11,6 @@ export function abstract() {
})());
}
/**
* Inherit the prototype methods from one constructor into another.
*
* Usage:
*
* function ParentClass(a, b) { }
* ParentClass.prototype.foo = function(a) { }
*
* function ChildClass(a, b, c) {
* // Call parent constructor
* ParentClass.call(this, a, b);
* }
* inherits(ChildClass, ParentClass);
*
* var child = new ChildClass('a', 'b', 'see');
* child.foo(); // This works.
*
* @param {!Function} childCtor Child constructor.
* @param {!Function} parentCtor Parent constructor.
* @function module:ol.inherits
* @deprecated
* @api
*/
export function inherits(childCtor, parentCtor) {
childCtor.prototype = Object.create(parentCtor.prototype);
childCtor.prototype.constructor = childCtor;
}
/**
* Counter for getUid.
* @type {number}