"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SubscriptionEventTarget = exports.TypedEventTarget = void 0;
const buildTypedEventTargetType = () => {
    const klass = class TypedEventTarget {
        addEventListener() { }
        dispatchEvent() {
            return true;
        }
        removeEventListener() { }
    };
    return EventTarget;
};
exports.TypedEventTarget = buildTypedEventTargetType();
class SubscriptionEventTarget extends exports.TypedEventTarget {
    subscribe(type, listener) {
        this.addEventListener(type, listener);
        return () => this.removeEventListener(type, listener);
    }
}
exports.SubscriptionEventTarget = SubscriptionEventTarget;
//# sourceMappingURL=TypedEventTarget.js.map