Replies: 1 comment
-
A downside of this approach is that unlike JSON files, messages in source code might not be compatible with other tools like the VSCode integration for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to have completions and type-checking while authoring my messages, so that I won't forget to include certain namespaces, etc. The docs suggests something like this:
global.d.ts
This is useful for type-inferring the messages you've written for a single locale, but it doesn't help ensure that your messages are uniform and correct across all locales.
I'm thinking of just using
.ts
files for my messages so that I can just directly typecheck them, like this:./messages/en.ts
But is this a good practice? Is there a downside to this approach? I considered using JSON schemas, but I feel that would complicate the build process and code generation.
Beta Was this translation helpful? Give feedback.
All reactions