File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -59,17 +59,23 @@ export const RequestIdSchema = z.union([z.string(), z.number().int()]);
59
59
/**
60
60
* A request that expects a response.
61
61
*/
62
- export const JSONRPCRequestSchema = RequestSchema . extend ( {
63
- jsonrpc : z . literal ( JSONRPC_VERSION ) ,
64
- id : RequestIdSchema ,
65
- } ) . strict ( ) ;
62
+ export const JSONRPCRequestSchema = z
63
+ . object ( {
64
+ jsonrpc : z . literal ( JSONRPC_VERSION ) ,
65
+ id : RequestIdSchema ,
66
+ } )
67
+ . merge ( RequestSchema )
68
+ . strict ( ) ;
66
69
67
70
/**
68
71
* A notification which does not expect a response.
69
72
*/
70
- export const JSONRPCNotificationSchema = NotificationSchema . extend ( {
71
- jsonrpc : z . literal ( JSONRPC_VERSION ) ,
72
- } ) . strict ( ) ;
73
+ export const JSONRPCNotificationSchema = z
74
+ . object ( {
75
+ jsonrpc : z . literal ( JSONRPC_VERSION ) ,
76
+ } )
77
+ . merge ( NotificationSchema )
78
+ . strict ( ) ;
73
79
74
80
/**
75
81
* A successful (non-error) response to a request.
You can’t perform that action at this time.
0 commit comments