forked from Blendman974/faceclaw
Introduce oxlint, and fix lint warnings
This commit is contained in:
1 parent
cb6dddd120
commit
06146c2b08
89 files changed
+818
-469
No files matched your search
@@ -8,7 +8,7 @@ declare const java: any;
|
||||
* translation to the phone's default language beneath it.
|
||||
*/
|
||||
|
||||
let languageIdentifier: any | null = null;
|
||||
let languageIdentifier: any = null;
|
||||
// Translators are expensive to build (model download on first use); cache by
|
||||
// "src>dst" and keep the proxies referenced so they aren't GC'd mid-flight.
|
||||
const translators = new Map<string, any>();
|
||||
@@ -59,7 +59,7 @@ export function identifyLanguage(text: string): Promise<string> {
|
||||
});
|
||||
}
|
||||
|
||||
function translatorFor(sourceLang: string, targetLang: string): any | null {
|
||||
function translatorFor(sourceLang: string, targetLang: string): any {
|
||||
const key = `${sourceLang}>${targetLang}`;
|
||||
const cached = translators.get(key);
|
||||
if (cached) return cached;
|
||||
|
||||
Reference in new issue
Block a user