Skip to content

Commit

Permalink
More tRPC v10 regression fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
icflorescu committed Mar 3, 2024
1 parent bb54908 commit 1ec2891
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: package
- uses: JS-DevTools/npm-publish@v1
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}

Expand Down
10 changes: 5 additions & 5 deletions package/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Handle, RequestEvent } from '@sveltejs/kit';
import type {
AnyTRPCRouter,
AnyRouter,
ProcedureType,
TRPCError,
TRPCProcedureType,
inferRouterContext,
inferRouterError
} from '@trpc/server';
Expand All @@ -18,7 +18,7 @@ import type { ValidRoute } from './ValidRoute';
* consider [the sequence helper function](https://kit.svelte.dev/docs/modules#sveltejs-kit-hooks).
* @see https://kit.svelte.dev/docs/hooks
*/
export function createTRPCHandle<Router extends AnyTRPCRouter, URL extends string>({
export function createTRPCHandle<Router extends AnyRouter, URL extends string>({
router,
url = '/trpc',
createContext,
Expand Down Expand Up @@ -51,7 +51,7 @@ export function createTRPCHandle<Router extends AnyTRPCRouter, URL extends strin
data: TRPCResponse<unknown, inferRouterError<Router>>[];
ctx?: inferRouterContext<Router>;
paths?: string[];
type: TRPCProcedureType;
type: ProcedureType;
errors: TRPCError[];
}) => ResponseMeta;

Expand All @@ -65,7 +65,7 @@ export function createTRPCHandle<Router extends AnyTRPCRouter, URL extends strin
path: string;
input: unknown;
req: RequestInit;
type: TRPCProcedureType | 'unknown';
type: ProcedureType | 'unknown';
}) => void;
}): Handle {
return async ({ event, resolve }) => {
Expand Down
1 change: 0 additions & 1 deletion package/src/websocket/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function createTRPCWebSocketClient<Router extends AnyRouter>(): ReturnTyp
});

return createTRPCProxyClient<Router>({
// @ts-expect-error - need to address this when tRPC v11 stable is released
links: [wsLink({ client: wsClient })]
} as CreateTRPCClientOptions<Router>);
}

0 comments on commit 1ec2891

Please sign in to comment.