Merge pull request #9157 from fredj/rm_inherits
Remove deprecated inherits function
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user