mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-02 19:13:25 +09:00
refactor: improve types in the frontend, misc fixes (#39142)
This commit is contained in:
@@ -47,8 +47,8 @@ function processAssetsSvgFiles(pattern: string, opts: Opts = {}) {
|
||||
return glob(pattern).map((path) => processAssetsSvgFile(path, opts));
|
||||
}
|
||||
|
||||
function lowercaseKeys(obj: Record<string, any>) {
|
||||
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key.toLowerCase(), value]));
|
||||
function lowercaseKeys<T extends Record<string, unknown>>(obj: T): T {
|
||||
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key.toLowerCase(), value])) as T;
|
||||
}
|
||||
|
||||
async function processMaterialFileIcons() {
|
||||
|
||||
Reference in New Issue
Block a user