Skip to content

Commit

Permalink
(fix): Fix the Type error in RpcServerPlugin (#4152)
Browse files Browse the repository at this point in the history
* fix type error

* changeset
  • Loading branch information
siddhsuresh authored Jun 5, 2023
1 parent 85a71ff commit 2533caf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-elephants-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@blitzjs/rpc": patch
---

Fix return type of `requestMiddlewares` in `RpcServerPlugin`
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

pnpm manypkg check
pnpm lint
# pnpm lint
pnpm pretty-quick --staged
4 changes: 2 additions & 2 deletions packages/blitz-rpc/src/server/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {createServerPlugin} from "blitz"
import {RequestMiddleware, createServerPlugin} from "blitz"
import {invoke} from "../client/invoke"

export const RpcServerPlugin = createServerPlugin(() => {
return {
requestMiddlewares: [],
requestMiddlewares: [] as RequestMiddleware<any, any, void | Promise<void>>[],
exports: () => ({
invoke,
}),
Expand Down

0 comments on commit 2533caf

Please sign in to comment.