Is there a typesafe way to build a path to string?
Question
I'm using Tanstack Router and Tanstack Start and I'm wondering if there's a way to do something like:
so that
path is the resolved string and buildPath only accepts type safe to and params.Specific use case
I'm using OAuth as an authentication method and I have an api route at
/api/auth/google which accepts a redirect query param so that once the authentication is complete the flow ends by redirecting to redirect and I'd like to pass a valid path to this redirect query param like so: