Skip to content

Commit

Permalink
Fix typescript compile issue
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <jay@zijie.wang>
  • Loading branch information
xiaohk committed Feb 21, 2024
1 parent a1df0b2 commit a7c9e2c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Farsight | In Situ Interactive Widgets for Fostering Responsible AI Awareness</title>
<title>Farsight | In Situ Interactive Widgets for Responsible AI</title>

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
Expand Down
4 changes: 3 additions & 1 deletion src/components/youtube/youtube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class NightjarYoutube extends LitElement {
// Class Properties ||
//==========================================================================||
@property({ type: String })
videoId: string;
videoId!: string;

iframeApiReady = false;

Expand All @@ -37,6 +37,7 @@ export class NightjarYoutube extends LitElement {
window.addEventListener('iframeApiReady', () => {
if (!this.shadowRoot) throw Error('No shadow root');
const playerElement = this.shadowRoot.querySelector('#demo-video');
// @ts-ignore
this.player = new YT.Player(playerElement, {
videoId: this.videoId,
width: '780',
Expand All @@ -53,6 +54,7 @@ export class NightjarYoutube extends LitElement {
tag.src = 'https://www.youtube.com/iframe_api';
const firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode!.insertBefore(tag, firstScriptTag);
// @ts-ignore
window.onYouTubeIframeAPIReady = () => {
window.dispatchEvent(new Event('iframeApiReady'));
};
Expand Down
6 changes: 3 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default defineConfig(({ command, mode }) => {
}
}
},
plugins: []
plugins: [yaml()]
};
}

Expand All @@ -58,7 +58,7 @@ export default defineConfig(({ command, mode }) => {
build: {
outDir: 'dist'
},
plugins: []
plugins: [yaml()]
};
}

Expand All @@ -74,7 +74,7 @@ export default defineConfig(({ command, mode }) => {
}
}
},
plugins: []
plugins: [yaml()]
};
}

Expand Down

0 comments on commit a7c9e2c

Please sign in to comment.