When running the code example as-presented, the following error occurs:
SyntaxError: The requested module '@connectrpc/connect' does not provide an export named 'ConnectRouter'
I am not sure exactly why this is. It may be due to a change in a newer TypeScript or tsx version than when this was tested, that causes tsx to not prune the import if it is not a type import.
Either way, this should be more correct anyways, so it seems like the best way to go.
When running the code example as-presented, the following error occurs:
I am not sure exactly why this is. It may be due to a change in a newer TypeScript or
tsx
version than when this was tested, that causestsx
to not prune the import if it is not a type import.Either way, this should be more correct anyways, so it seems like the best way to go.