You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially when writing trpc>1 I was thinking I would use / as a separator between sub-routers, but it's more readable to have the whole path written out.
I've forgotten to add the . at the end a few times when creating sub-routers and it's a bit annoying. Don't see any harm in enforcing it.
This would be a major version change, but easy refactor - could be done application-wide with a simple regex.
Change proposal
Before
constappRouter=createRouter().merge('users.',users)// prefix user procedures with "users.".merge('posts.',posts)// prefix poosts procedures with "posts.";
After
constappRouter=createRouter().merge('users',users)// prefix user procedures with "users.".merge('posts',posts)// prefix poosts procedures with "posts.";
The text was updated successfully, but these errors were encountered:
I think this can be achieved without making it a breaking change. Can have automatic alias for ones without it and then add a linting rule or something? But I am fine with making another major version. Which ever works for you.
Initially when writing trpc>1 I was thinking I would use
/
as a separator between sub-routers, but it's more readable to have the whole path written out.I've forgotten to add the
.
at the end a few times when creating sub-routers and it's a bit annoying. Don't see any harm in enforcing it.This would be a major version change, but easy refactor - could be done application-wide with a simple regex.
Change proposal
Before
After
The text was updated successfully, but these errors were encountered: