Complete runtime API implementation

This commit is contained in:
Joseph Garrone
2024-09-21 17:59:16 +02:00
parent 40ebbdebeb
commit 969744f4cb
13 changed files with 289 additions and 126 deletions

View File

@ -140,13 +140,15 @@ async function generateI18nMessages() {
);
fs.writeFileSync(
pathJoin(messagesDirPath, "LanguageTag.ts"),
pathJoin(messagesDirPath, "types.ts"),
Buffer.from(
[
``,
`export const languageTags = ${JSON.stringify(languages, null, 2)} as const;`,
``,
`export type LanguageTag = typeof languageTags[number];`,
``,
`export type MessageKey = keyof typeof import("./en")["default"];`,
``
].join("\n"),
"utf8"