TypeScript check and typing corrections.

This commit is contained in:
2026-01-30 19:03:37 +00:00
parent 21250a1a2d
commit 4f39875786
14 changed files with 27 additions and 22 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ export function getFileType(name: string): string {
const dotIndex = name.lastIndexOf('.')
if (dotIndex === -1 || dotIndex === name.length - 1) return 'unknown'
const ext = name.slice(dotIndex + 1).toLowerCase()
return Object.keys(filetypes).find(type => filetypes[type].includes(ext)) || 'unknown'
return Object.keys(filetypes).find(type => filetypes[type]!.includes(ext)) || 'unknown'
}
// Prebuilt for fast & consistent sorting