Provide a way to generate types from defined routes #18
Replies: 2 comments 1 reply
-
Maybe we could expose part of the lower level APIs like the router tree or simply adding/removing pages but you would still need to handle all the parsing yourself as there is only code to parse filepaths like I exposed the context at d8d1ea7 in |
Beta Was this translation helpful? Give feedback.
-
@sheremet-va that's brilliant! I had pretty much the same idea as described in #127 but I think having a low level API would be better!
@posva how difficult it could be to parse filepaths with |
Beta Was this translation helpful? Give feedback.
-
Is it possible to provide a way to generate these types with routes defined by hand? I mean something like this:
For people who don't use file based routing. We can run a small plugin that runs this script when
./src/routes
or its dependencies change.Beta Was this translation helpful? Give feedback.
All reactions