Skip to content

Commit 9563135

Browse files
fix: update PromptArgsRawShape for zod v4 type system
Replace generic ZodType<string, ZodTypeDef, string> with concrete ZodString type. This fixes compatibility with Zod v4's internal type system changes. Resolves 8 compilation errors (Category D & F): - 5 errors in mcp.ts type constraints - 3 cascading errors in example servers
1 parent caed2d5 commit 9563135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ export type RegisteredResourceTemplate = {
11331133
};
11341134

11351135
type PromptArgsRawShape = {
1136-
[k: string]: ZodType<string, ZodTypeDef, string> | ZodOptional<ZodType<string, ZodTypeDef, string>>;
1136+
[k: string]: ZodString | ZodOptional<ZodString>;
11371137
};
11381138

11391139
export type PromptCallback<Args extends undefined | PromptArgsRawShape = undefined> = Args extends PromptArgsRawShape

0 commit comments

Comments
 (0)