Skip to content

Commit 4e02fd9

Browse files
committed
up
1 parent 113fd96 commit 4e02fd9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/utils/json-rpc.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ export type JsonRpcMethod<
5656
I extends JsonRpcParams | undefined = JsonRpcParams | undefined,
5757
> = (data: JsonRpcRequest<I>, event: H3Event) => O | Promise<O>;
5858

59-
/**
60-
* A map of method names to their corresponding functions.
61-
*/
62-
type JsonRpcMethodMap = Record<string, JsonRpcMethod>;
63-
6459
// Official JSON-RPC 2.0 error codes.
6560
/**
6661
* Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
@@ -150,7 +145,7 @@ export function defineJsonRpc<
150145
* }));
151146
*/
152147
export function defineJsonRpcHandler<RequestT extends EventHandlerRequest = EventHandlerRequest>(
153-
methods: JsonRpcMethodMap,
148+
methods: Record<string, JsonRpcMethod>,
154149
middleware?: Middleware[],
155150
): EventHandler<RequestT> {
156151
/**

0 commit comments

Comments
 (0)