New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow typescript compilation of nuxt.config #198
Conversation
@danielroe Could you resolve conflicts ? Also what exactly did you succeed to achieve for now ? |
@kevinmarrec I've edited the PR description explaining what it can currently do. |
@kevinmarrec Okay, I've added tests and docs and think this is now ready for you to look at. |
aae3fa0
to
7ad3d27
Compare
Hey, I was following the guide for support typescript with serverMiddleware by using I'm running into a bunch of syntax errors with nuxt-ts generate, but I suppose if the feature is not supported, those errors are also expected? |
So I solved my issue, in a way! I didn't manage to make typescript compiling work, but simply enabling the options An advantage of defining types in a '.d.ts' file is that you can share them between your APIs and front end! I am impressed by how great interoperability between jsdoc and typescript is; I have yet to come to a situation where I want to specify a certain type in jsdoc and I can't. Having used this for a production app, I think this is even better than writing typescript files, because 1. you don't have to worry about any kind of compiling issues 2. your codebase remains clean JavaScript and 3. I find jsdocs to be necessary for certain functions and methods anyways Hope it helps! |
Is this dead? |
This PR allows typescript compilation of
nuxt.config.ts
, as well asserverMiddleware
and localmodules
. When using this approach,@nuxt/typescript-runtime
should only be required at build-time.Rendered docs
TODO: