Restructure files
This commit is contained in:
@ -12,8 +12,13 @@ fs.writeFileSync(
|
||||
dtsPath,
|
||||
`type Translation = Record<string, string>;
|
||||
declare const exportee: {
|
||||
${Object.keys(json)
|
||||
.map(x => `${x}: Translation;`)
|
||||
${Object.entries(json)
|
||||
.map(
|
||||
([category, value]) =>
|
||||
`${category}: {\n${Object.keys(value)
|
||||
.map(key => ` ${key}: Translation;`)
|
||||
.join("\n")}\n };`
|
||||
)
|
||||
.join("\n ")}
|
||||
};
|
||||
export default exportee;
|
||||
|
Reference in New Issue
Block a user