mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Enable Typescript noImplicitAny (#33322)
				
					
				
			Enable `noImplicitAny` and fix all issues. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -2,14 +2,14 @@ import {handleReply} from './repo-issue.ts'; | ||||
| import {getComboMarkdownEditor, initComboMarkdownEditor, ComboMarkdownEditor} from './comp/ComboMarkdownEditor.ts'; | ||||
| import {POST} from '../modules/fetch.ts'; | ||||
| import {showErrorToast} from '../modules/toast.ts'; | ||||
| import {hideElem, querySingleVisibleElem, showElem} from '../utils/dom.ts'; | ||||
| import {hideElem, querySingleVisibleElem, showElem, type DOMEvent} from '../utils/dom.ts'; | ||||
| import {attachRefIssueContextPopup} from './contextpopup.ts'; | ||||
| import {initCommentContent, initMarkupContent} from '../markup/content.ts'; | ||||
| import {triggerUploadStateChanged} from './comp/EditorUpload.ts'; | ||||
| import {convertHtmlToMarkdown} from '../markup/html2markdown.ts'; | ||||
| import {applyAreYouSure, reinitializeAreYouSure} from '../vendor/jquery.are-you-sure.ts'; | ||||
|  | ||||
| async function tryOnEditContent(e) { | ||||
| async function tryOnEditContent(e: DOMEvent<MouseEvent>) { | ||||
|   const clickTarget = e.target.closest('.edit-content'); | ||||
|   if (!clickTarget) return; | ||||
|  | ||||
| @@ -21,14 +21,14 @@ async function tryOnEditContent(e) { | ||||
|  | ||||
|   let comboMarkdownEditor : ComboMarkdownEditor; | ||||
|  | ||||
|   const cancelAndReset = (e) => { | ||||
|   const cancelAndReset = (e: Event) => { | ||||
|     e.preventDefault(); | ||||
|     showElem(renderContent); | ||||
|     hideElem(editContentZone); | ||||
|     comboMarkdownEditor.dropzoneReloadFiles(); | ||||
|   }; | ||||
|  | ||||
|   const saveAndRefresh = async (e) => { | ||||
|   const saveAndRefresh = async (e: Event) => { | ||||
|     e.preventDefault(); | ||||
|     // we are already in a form, do not bubble up to the document otherwise there will be other "form submit handlers" | ||||
|     // at the moment, the form submit event conflicts with initRepoDiffConversationForm (global '.conversation-holder form' event handler) | ||||
| @@ -60,7 +60,7 @@ async function tryOnEditContent(e) { | ||||
|       } else { | ||||
|         renderContent.innerHTML = data.content; | ||||
|         rawContent.textContent = comboMarkdownEditor.value(); | ||||
|         const refIssues = renderContent.querySelectorAll('p .ref-issue'); | ||||
|         const refIssues = renderContent.querySelectorAll<HTMLElement>('p .ref-issue'); | ||||
|         attachRefIssueContextPopup(refIssues); | ||||
|       } | ||||
|       const content = segment; | ||||
| @@ -125,7 +125,7 @@ function extractSelectedMarkdown(container: HTMLElement) { | ||||
|   return convertHtmlToMarkdown(el); | ||||
| } | ||||
|  | ||||
| async function tryOnQuoteReply(e) { | ||||
| async function tryOnQuoteReply(e: Event) { | ||||
|   const clickTarget = (e.target as HTMLElement).closest('.quote-reply'); | ||||
|   if (!clickTarget) return; | ||||
|  | ||||
| @@ -139,7 +139,7 @@ async function tryOnQuoteReply(e) { | ||||
|  | ||||
|   let editor; | ||||
|   if (clickTarget.classList.contains('quote-reply-diff')) { | ||||
|     const replyBtn = clickTarget.closest('.comment-code-cloud').querySelector('button.comment-form-reply'); | ||||
|     const replyBtn = clickTarget.closest('.comment-code-cloud').querySelector<HTMLElement>('button.comment-form-reply'); | ||||
|     editor = await handleReply(replyBtn); | ||||
|   } else { | ||||
|     // for normal issue/comment page | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 silverwind
					silverwind