fix: add explicit .js extensions to relative imports so declarations resolve under NodeNext/Node16

The emitted .d.ts copy relative specifiers verbatim, and the extensionless form
(e.g. `from "./events"`) doesn't resolve under Node16/NodeNext, hiding inherited
members such as `addEventListener` (TS2339). Appending `.js` matches the existing
SDK-import style and works with both bundler-mode type-checking and Bun.build.
Types-only; runtime is unaffected.

Fixes #704
This commit is contained in:
Ken Jo 2026-07-11 21:03:43 +09:00 • committed by Olivier Chafik
commit 264d9cae44

View file

@ -6,7 +6,7 @@ import {
RESOURCE_MIME_TYPE,
getUiCapability,
EXTENSION_ID,
} from "./index";
} from "./index.js";
import type { McpServer } from "@modelcontextprotocol/server";
describe("registerAppTool", () => {