Skip to content

Commit b32c18d

Browse files
Wrap type test in describe/it and apply undefined Args to RegisteredPrompt.update
1 parent bfd4be0 commit b32c18d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

packages/server/src/server/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ export type RegisteredPrompt = {
12391239
enabled: boolean;
12401240
enable(): void;
12411241
disable(): void;
1242-
update<Args extends StandardSchemaWithJSON>(updates: {
1242+
update<Args extends StandardSchemaWithJSON | undefined = undefined>(updates: {
12431243
name?: string | null;
12441244
title?: string;
12451245
description?: string;

packages/server/test/server/mcp.types.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* no-argsSchema and with-argsSchema overloads of registerPrompt.
66
*/
77
import type { GetPromptResult, ServerContext } from '@modelcontextprotocol/core';
8+
import { describe, it } from 'vitest';
89
import * as z from 'zod/v4';
910

1011
import { McpServer } from '../../src/server/mcp.js';
@@ -32,3 +33,10 @@ function registerPrompt_withArgs() {
3233
(args: { code: string }, ctx: ServerContext) => result
3334
);
3435
}
36+
37+
describe('registerPrompt types', () => {
38+
it('compiles', () => {
39+
// The functions above are compile-time type assertions; this suite
40+
// exists so vitest detects the file as containing tests.
41+
});
42+
});

0 commit comments

Comments
 (0)