Fix a number of Typescript issues (#31877)

Typescript error count is reduced from 633 to 540 with this. No runtime
changes except in test code.
This commit is contained in:
2024-08-28 18:32:38 +02:00
committed by GitHub
parent 39d2fdefaf
commit 7207d93f01
16 changed files with 141 additions and 79 deletions

View File

@ -98,12 +98,12 @@ initGiteaFomantic();
initDirAuto();
initSubmitEventPolyfill();
function callInitFunctions(functions) {
function callInitFunctions(functions: (() => any)[]) {
// Start performance trace by accessing a URL by "https://localhost/?_ui_performance_trace=1" or "https://localhost/?key=value&_ui_performance_trace=1"
// It is a quick check, no side effect so no need to do slow URL parsing.
const initStart = performance.now();
if (window.location.search.includes('_ui_performance_trace=1')) {
let results = [];
let results: {name: string, dur: number}[] = [];
for (const func of functions) {
const start = performance.now();
func();