Closed osdiab closed 2 years ago
Not sure if I understand you request correctly...
Would you like the generated types to be in the same folder as the "regular" types you define for your project? My idea was to dump this file in the src/@types
so that it doesn't interfere with your other types and so that you "automagically" get the correct type when doing e.g.:
import { getRoute } from "next-type-safe-routes";
I'm of the impression that it's conventional to have a @types
folder for defining/overriding types from external packages, but again, I'm not quiet sure what you want to achieve? :)
Yeah, it is common, but I had just named that folder differently, so using this project made me feel compelled to move all my other typings so that i can abide by the directory pattern this project chose - I think that while src/@types
is a reasonable default, i'm just suggesting that it's a nice-to-have to be able to set it so that this project doesn't dictate the user's folder hierarchy.
Ok. Makes sense. I'm totally fine making the output destination configurable as you suggest :)
Will close since this has become a duplicate of #32
The plugin stores the typing at
src/@types/next-type-safe-routes
, but for my other types I had been putting them atsrc/types/...
so using this library is imposing the particular location on me - would rather it were a bit more configurable, but it's not a big deal for me to move the existing files for consistency.