[v4] is there currently a way to programmatically generate the .d.json.ts
files from createMessagesDeclaration
?
#1737
-
it would be cool if i could generate message |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The declaration file is currently generated anytime the Next.js config is read, and optionally runs in a continuous fashion if in dev mode. Therefore anytime you invoke a command from the Does that help? |
Beta Was this translation helpful? Give feedback.
-
see #1832 (comment) |
Beta Was this translation helpful? Give feedback.
I see. The generation of the declaration file is really workaround for the time being, I hope to get rid of it at some point when microsoft/TypeScript#32063 becomes a thing. Therefore I'd like to not introduce more public API than absolutely necessary for now.
As a side note, for ESLint this shouldn't make a difference, the declaration file is only relevant to
tsc
which runs as part ofnext build
by default. Also, it merely introduces stricter types than what you have out-of-the-box, so your lint should pass in any case. But if you check types duringnext build
, you can get stricter validation.