Skip to content
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

configuration should allow custom destination for generated types. #32

Open
airtonix opened this issue Jan 25, 2022 · 1 comment · May be fixed by #35
Open

configuration should allow custom destination for generated types. #32

airtonix opened this issue Jan 25, 2022 · 1 comment · May be fixed by #35
Assignees
Labels
enhancement New feature or request

Comments

@airtonix
Copy link

writeTypesToDisc(pagesDir);

in our nextjs projects we write out other generated typescript .d.ts files for our gql schema under

apps/
  appname/
    __generated__/
     ts-gql/
       .*
    src/
      pages/
      components/
      services/
      etc/
      etc/
      etc/

we'd like to put our route types:

apps/
  appname/
    __generated__/
     next-type-safe-routes/
       .*
     ts-gql/
       .*
    src/
      pages/
      components/
      services/
      etc/
      etc/
      etc/
@airtonix airtonix changed the title writeTypesToDisc should allow custom destination. configuration should allow custom destination for generated types. Jan 25, 2022
@osdiab osdiab linked a pull request Jan 28, 2022 that will close this issue
@osdiab
Copy link
Collaborator

osdiab commented Mar 11, 2022

I have another reason this is a good idea - I would love to be able to reference valid paths from another project that has redirects/API access to my NextJS project, and I use a monorepo structure - so it would be super cool if the definitions could even be sent outside the project to such a subpackage, so that I can use the getRoute() helper fully outside of NextJS (rather than needing to have all of the NextJS project as a dependency).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants