Skip to content

Commit 2e3c4d3

Browse files
committed
fix ts type issues
1 parent 176c90d commit 2e3c4d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web_src/js/features/repo-home.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {fomanticQuery} from '../modules/fomantic/base.ts';
77
const {appSubUrl} = window.config;
88

99
export function initRepoTopicBar() {
10-
const mgrBtns = document.querySelectorAll('#manage_topic');
10+
const mgrBtns = document.querySelectorAll<HTMLButtonElement>('#manage_topic');
1111
if (mgrBtns.length === 0) return;
1212

1313
for (const mgrBtn of mgrBtns) {
@@ -19,7 +19,7 @@ export function initRepoTopicBar() {
1919
mgrBtn.addEventListener('click', () => {
2020
hideElem(viewDiv);
2121
showElem(editDiv);
22-
topicDropdown.querySelector('input.search').focus();
22+
topicDropdown.querySelector<HTMLInputElement>('input.search').focus();
2323
});
2424

2525
mgrBtn.parentNode.querySelector('#cancel_topic_edit').addEventListener('click', () => {
@@ -29,9 +29,9 @@ export function initRepoTopicBar() {
2929
mgrBtn.focus();
3030
});
3131

32-
mgrBtn.parentNode.querySelector('#save_topic').addEventListener('click', async (e) => {
32+
mgrBtn.parentNode.querySelector('#save_topic').addEventListener('click', async (e: MouseEvent & {target: HTMLAnchorElement}) => {
3333
lastErrorToast?.hideToast();
34-
const topics = editDiv.querySelector('input[name=topics]').value;
34+
const topics = editDiv.querySelector<HTMLInputElement>('input[name=topics]').value;
3535

3636
const data = new FormData();
3737
data.append('topics', topics);

0 commit comments

Comments
 (0)