Skip to content

Commit 3f68c37

Browse files
committed
test: add type assertion to bypass type check
1 parent fc9ca5f commit 3f68c37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/examples/server/mcpServerOutputSchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ server.registerTool(
4343
void country;
4444
// Simulate weather API call
4545
const temp_c = Math.round((Math.random() * 35 - 5) * 10) / 10;
46-
const conditions = ["sunny", "cloudy", "rainy", "stormy", "snowy"][Math.floor(Math.random() * 5)];
46+
const conditions = ["sunny", "cloudy", "rainy", "stormy", "snowy"][Math.floor(Math.random() * 5)] as unknown as "sunny" | "cloudy" | "rainy" | "stormy" | "snowy";
4747

4848
const structuredContent = {
4949
temperature: {
@@ -77,4 +77,4 @@ async function main() {
7777
main().catch((error) => {
7878
console.error("Server error:", error);
7979
process.exit(1);
80-
});
80+
});

0 commit comments

Comments
 (0)