Skip to content

Commit b759710

Browse files
committed
fix(types): resolve TypeScript compilation errors
- Fix symbol indexing with proper type assertion in Sentry instrumentation - Fix mock executor call signature to match expected parameters - Ensure strict TypeScript compliance for CI builds
1 parent 55ad4e6 commit b759710

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/server/instrumentation.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function maybeWrapWithSentry(
3636
options: SentryOptions = {},
3737
): Promise<McpServer> {
3838
// Check if server is already wrapped (idempotency guard)
39-
if ((server as Record<string, unknown>)[SENTRY_WRAPPED_SYMBOL]) {
39+
if ((server as unknown as Record<string | symbol, unknown>)[SENTRY_WRAPPED_SYMBOL]) {
4040
log('debug', 'Server already wrapped with Sentry, skipping');
4141
return server;
4242
}
@@ -69,7 +69,8 @@ export async function maybeWrapWithSentry(
6969
const instrumentedServer = Sentry.wrapMcpServerWithSentry(server);
7070

7171
// Mark as wrapped to prevent double-wrapping
72-
(instrumentedServer as Record<string, unknown>)[SENTRY_WRAPPED_SYMBOL] = true;
72+
(instrumentedServer as unknown as Record<string | symbol, unknown>)[SENTRY_WRAPPED_SYMBOL] =
73+
true;
7374

7475
log('info', 'Server wrapped with Sentry MCP instrumentation');
7576
return instrumentedServer;

src/test-utils/mock-executors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function createMockExecutor(
8181
allowFailure?: boolean,
8282
): Promise<MockCommandResult> => {
8383
calls.push({ command, description, allowFailure });
84-
return mockFn(command, description, allowFailure);
84+
return mockFn();
8585
};
8686

8787
// Add call tracking properties

0 commit comments

Comments
 (0)