feat: partial locale type

This commit is contained in:
Yidadaa
2023-05-19 00:59:04 +08:00
parent de775511d0
commit 50cfbaaab5
5 changed files with 27 additions and 4 deletions

9
app/utils/merge.ts Normal file
View File

@@ -0,0 +1,9 @@
export function merge(target: any, source: any) {
Object.keys(source).forEach(function (key) {
if (source[key] && typeof source[key] === "object") {
merge((target[key] = target[key] || {}), source[key]);
return;
}
target[key] = source[key];
});
}