mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 23:12:38 +08:00
refactor(types): 将Tesseract.LanguageCode重命名为TesseractLangCode以提高可读性
This commit is contained in:
parent
42923d51e9
commit
c549fff44a
@ -128,7 +128,7 @@ export type OcrImageHandler = (file: ImageFileMetadata) => Promise<OcrResult>
|
||||
|
||||
// Tesseract Types
|
||||
export type OcrTesseractConfig = OcrProviderConfig & {
|
||||
langs: Record<Tesseract.LanguageCode, boolean>
|
||||
langs: Record<TesseractLangCode, boolean>
|
||||
}
|
||||
|
||||
export type OcrTesseractProvider = BuiltinOcrProvider & {
|
||||
@ -138,3 +138,5 @@ export type OcrTesseractProvider = BuiltinOcrProvider & {
|
||||
export const isOcrTesseractProvider = (p: OcrProvider): p is OcrTesseractProvider => {
|
||||
return p.id === BuiltinOcrProviderIds.tesseract
|
||||
}
|
||||
|
||||
export type TesseractLangCode = Tesseract.LanguageCode
|
||||
|
||||
Loading…
Reference in New Issue
Block a user