Skip to content

Commit e07c470

Browse files
fixup(d1-base): align LegacyContextFields.sendRequest types with StandardSchemaV1 (post-#1974)
1 parent e99adbb commit e07c470

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/shared/protocol.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export interface LegacyContextFields {
179179
/** @deprecated Use `ctx.mcpReq.notify` */
180180
sendNotification: (notification: Notification) => Promise<void>;
181181
/** @deprecated Use `ctx.mcpReq.send` */
182-
sendRequest: <T extends AnySchema>(request: Request, resultSchema: T, options?: RequestOptions) => Promise<SchemaOutput<T>>;
182+
sendRequest: <T extends StandardSchemaV1>(request: Request, resultSchema: T, options?: RequestOptions) => Promise<StandardSchemaV1.InferOutput<T>>;
183183
/** @deprecated Use `ctx.task?.store` */
184184
taskStore?: TaskContext['store'];
185185
/** @deprecated Use `ctx.task?.id` */
@@ -336,7 +336,7 @@ export type RequestHandlerExtra<_Req = unknown, _Notif = unknown> = ServerContex
336336
*/
337337
function withLegacyContextFields<T extends BaseContext>(
338338
ctx: T,
339-
sendRequest: <S extends AnySchema>(r: Request, s: S, o?: RequestOptions) => Promise<SchemaOutput<S>>
339+
sendRequest: <S extends StandardSchemaV1>(r: Request, s: S, o?: RequestOptions) => Promise<StandardSchemaV1.InferOutput<S>>
340340
): T & LegacyContextFields {
341341
return {
342342
...ctx,

0 commit comments

Comments
 (0)