TypeScript check and typing corrections.
This commit is contained in:
1 parent
21250a1a2d
commit
4f39875786
14 files changed
+27
-22
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user