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
This might be basic, but I was really struggling, so I wanted to share.
It seems that the baseUrl in tsconfig.json can negatively affect type inference for hono RPC.
I was having trouble with type inference not working when posting through RPC from the client side, but it started to work when I removed the following baseUrl from tsconfig.json:
"baseUrl": ".",
However, simply removing it caused the build to fail, so that needs to be addressed.
I was considering adopting ts-rest, but it seems I could return to hono RPC if I can overcome the build issues.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This might be basic, but I was really struggling, so I wanted to share.
It seems that the baseUrl in tsconfig.json can negatively affect type inference for hono RPC.
I was having trouble with type inference not working when posting through RPC from the client side, but it started to work when I removed the following baseUrl from tsconfig.json:
However, simply removing it caused the build to fail, so that needs to be addressed.
I was considering adopting ts-rest, but it seems I could return to hono RPC if I can overcome the build issues.
https://github.com/ts-rest/ts-rest
https://github.com/msutkowski/ts-rest-hono
Beta Was this translation helpful? Give feedback.
All reactions