summaryrefslogtreecommitdiff
path: root/js/custom_event.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/custom_event.ts')
-rw-r--r--js/custom_event.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/js/custom_event.ts b/js/custom_event.ts
index dd1c33d58..d2092a2be 100644
--- a/js/custom_event.ts
+++ b/js/custom_event.ts
@@ -4,13 +4,12 @@ import * as event from "./event";
import { getPrivateValue } from "./util";
// WeakMaps are recommended for private attributes (see MDN link below)
-// tslint:disable-next-line:max-line-length
// https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Add-on_SDK/Guides/Contributor_s_Guide/Private_Properties#Using_WeakMaps
export const customEventAttributes = new WeakMap();
export class CustomEventInit extends event.EventInit
implements domTypes.CustomEventInit {
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
detail: any;
constructor({
@@ -34,7 +33,7 @@ export class CustomEvent extends event.Event implements domTypes.CustomEvent {
customEventAttributes.set(this, { detail });
}
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
get detail(): any {
return getPrivateValue(this, customEventAttributes, "detail");
}
@@ -43,9 +42,9 @@ export class CustomEvent extends event.Event implements domTypes.CustomEvent {
type: string,
bubbles?: boolean,
cancelable?: boolean,
- // tslint:disable-next-line:no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
detail?: any
- ) {
+ ): void {
if (this.dispatched) {
return;
}