mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Fix some typescript issues (#32586)
Fixes around 30 or so typescript errors. No runtime changes.
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| import $ from 'jquery'; | ||||
| import type {FomanticInitFunction} from '../../types.ts'; | ||||
|  | ||||
| export function initFomanticApiPatch() { | ||||
|   // | ||||
| @@ -15,7 +16,7 @@ export function initFomanticApiPatch() { | ||||
|   // | ||||
|   const patchKey = '_giteaFomanticApiPatch'; | ||||
|   const oldApi = $.api; | ||||
|   $.api = $.fn.api = function(...args) { | ||||
|   $.api = $.fn.api = function(...args: Parameters<FomanticInitFunction>) { | ||||
|     const apiCall = oldApi.bind(this); | ||||
|     const ret = oldApi.apply(this, args); | ||||
|  | ||||
| @@ -23,7 +24,7 @@ export function initFomanticApiPatch() { | ||||
|       const internalGet = apiCall('internal', 'get'); | ||||
|       if (!internalGet.urlEncodedValue[patchKey]) { | ||||
|         const oldUrlEncodedValue = internalGet.urlEncodedValue; | ||||
|         internalGet.urlEncodedValue = function (value) { | ||||
|         internalGet.urlEncodedValue = function (value: any) { | ||||
|           try { | ||||
|             return oldUrlEncodedValue(value); | ||||
|           } catch { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user