mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix type annotations
This commit is contained in:
1 parent
4976f94ec0
commit
c89bf6cfdb
2 files changed
+4
-1
No files matched your search
@@ -736,7 +736,7 @@ export interface HydroGlobal {
|
|||||||
error: typeof import('./error');
|
error: typeof import('./error');
|
||||||
Logger: typeof import('./logger').Logger;
|
Logger: typeof import('./logger').Logger;
|
||||||
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 {
|
declare global {
|
||||||
|
|||||||
@@ -68,6 +68,9 @@ global.Hydro.locales = new Proxy(translations, {
|
|||||||
for (let i = s.length - 1; i; i--) Object.assign(result, s[i]);
|
for (let i = s.length - 1; i; i--) Object.assign(result, s[i]);
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
has(s, key: string) {
|
||||||
|
return !!s.find((i) => !!i[key]);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}) as any;
|
}) as any;
|
||||||
|
|||||||
Reference in new issue
Block a user