1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-04 17:47:19 +00:00

Enable Typescript noImplicitAny (#33322)

Enable `noImplicitAny` and fix all issues.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2025-01-22 08:11:51 +01:00
committed by GitHub
parent 6fe4d1c038
commit c7f4ca2653
63 changed files with 326 additions and 270 deletions

View File

@ -12,7 +12,7 @@ function initRepoSettingsCollaboration() {
for (const dropdownEl of queryElems(document, '.page-content.repository .ui.dropdown.access-mode')) {
const textEl = dropdownEl.querySelector(':scope > .text');
$(dropdownEl).dropdown({
async action(text, value) {
async action(text: string, value: string) {
dropdownEl.classList.add('is-loading', 'loading-icon-2px');
const lastValue = dropdownEl.getAttribute('data-last-value');
$(dropdownEl).dropdown('hide');
@ -53,8 +53,8 @@ function initRepoSettingsSearchTeamBox() {
apiSettings: {
url: `${appSubUrl}/org/${searchTeamBox.getAttribute('data-org-name')}/teams/-/search?q={query}`,
headers: {'X-Csrf-Token': csrfToken},
onResponse(response) {
const items = [];
onResponse(response: any) {
const items: Array<Record<string, any>> = [];
$.each(response.data, (_i, item) => {
items.push({
title: item.name,