UNPKG

@glodon-aiot/react-components

Version:

aiot react components

17 lines (16 loc) 620 B
/** * 获取文件扩展名 * @param fileName 文件名 * @returns 文件扩展名(小写,不含点号) */ export declare const getFileExtension: (fileName: string) => string | undefined; /** * 文件类型枚举 */ export type FileType = 'text' | 'json' | 'csv' | 'tsv' | 'markdown' | 'image' | 'video' | 'audio' | 'pdf' | 'office' | 'code' | 'html' | 'xml' | 'jsonl' | 'zip' | 'unknown'; /** * 根据文件扩展名判断文件类型 * @param extension 文件扩展名(小写,不含点号) * @returns 文件类型 */ export declare const getFileType: (extension: string | undefined) => FileType;