Typescript migration part 2 (#261)
Converts everything to typescript, adding `@ts-expect-error`s where necessary. Also makes some progress converting elements to use decorators, but we're not fully there yet — I think it'll make sense to continue to do that in future PRs, rather than doing it all in one go, just so that we can keep up with the dev branch.
This commit is contained in:
+8
-2
@@ -10,6 +10,7 @@ class Replay extends LitElement {
|
||||
collInfo: Item | Record<string, never> | null = null;
|
||||
|
||||
@property({ type: String })
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO fixme
|
||||
sourceUrl: any = null;
|
||||
|
||||
// external url set from parent
|
||||
@@ -33,12 +34,14 @@ class Replay extends LitElement {
|
||||
title = "";
|
||||
|
||||
@property({ type: String })
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO fixme
|
||||
iframeUrl: any = null;
|
||||
|
||||
@property({ type: Boolean })
|
||||
showAuth = false;
|
||||
|
||||
@property({ type: Object })
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO fixme
|
||||
authFileHandle: any = null;
|
||||
|
||||
private reauthWait: null | Promise<void> = null;
|
||||
@@ -161,7 +164,8 @@ class Replay extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
setDisablePointer(disable) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO fixme
|
||||
setDisablePointer(disable: any) {
|
||||
const iframe = this.renderRoot.querySelector("iframe");
|
||||
|
||||
if (iframe) {
|
||||
@@ -169,7 +173,8 @@ class Replay extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
onReplayMessage(event) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO fixme
|
||||
onReplayMessage(event: any) {
|
||||
const iframe = this.renderRoot.querySelector("iframe");
|
||||
|
||||
if (iframe && event.source === iframe.contentWindow) {
|
||||
@@ -237,6 +242,7 @@ class Replay extends LitElement {
|
||||
!iframe.contentDocument ||
|
||||
!iframe.contentWindow ||
|
||||
(iframe.contentDocument.readyState === "complete" &&
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO fixme
|
||||
!(iframe.contentWindow as Window & { _WBWombat: any })._WBWombat)
|
||||
) {
|
||||
this.clearLoading(iframe && iframe.contentWindow);
|
||||
|
||||
Reference in New Issue
Block a user