core: fix type annotations

This commit is contained in:
undefined committed 2022-11-05 18:12:05 +08:00
1 parent 4976f94ec0
commit c89bf6cfdb
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -736,7 +736,7 @@ export interface HydroGlobal {
error: typeof import('./error');
Logger: typeof import('./logger').Logger;
logger: typeof import('./logger').logger;
locales: Record<string, Record<string, string> | Record<symbol, Record<string, string>>>;
locales: Record<string, Record<string, string> & Record<symbol, Record<string, string>>>;
}
declare global {
+3
View File
@@ -68,6 +68,9 @@ global.Hydro.locales = new Proxy(translations, {
for (let i = s.length - 1; i; i--) Object.assign(result, s[i]);
return result;
},
has(s, key: string) {
return !!s.find((i) => !!i[key]);
},
});
},
}) as any;