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:
@ -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();
|
||||
|
Reference in New Issue
Block a user