Automated class transform
npx lebab --replace src --transform class
This commit is contained in:
+11
-11
@@ -7,7 +7,17 @@ import {UNDEFINED} from './functions.js';
|
||||
* Objects that need to clean up after themselves.
|
||||
* @constructor
|
||||
*/
|
||||
const Disposable = function() {};
|
||||
class Disposable {
|
||||
/**
|
||||
* Clean up.
|
||||
*/
|
||||
dispose() {
|
||||
if (!this.disposed_) {
|
||||
this.disposed_ = true;
|
||||
this.disposeInternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The object has already been disposed.
|
||||
@@ -16,16 +26,6 @@ const Disposable = function() {};
|
||||
*/
|
||||
Disposable.prototype.disposed_ = false;
|
||||
|
||||
/**
|
||||
* Clean up.
|
||||
*/
|
||||
Disposable.prototype.dispose = function() {
|
||||
if (!this.disposed_) {
|
||||
this.disposed_ = true;
|
||||
this.disposeInternal();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Extension point for disposable objects.
|
||||
* @protected
|
||||
|
||||
Reference in New Issue
Block a user