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:
parent
1a713173cc
commit
264d9cae44
1 changed files with 35 additions and 35 deletions
|
|
@ -3,8 +3,8 @@ import { Client, InMemoryTransport } from "@modelcontextprotocol/client";
|
|||
import { Server, type ServerCapabilities } from "@modelcontextprotocol/server";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
import { App } from "./app";
|
||||
import { LATEST_PROTOCOL_VERSION } from "./types";
|
||||
import { App } from "./app.js";
|
||||
import { LATEST_PROTOCOL_VERSION } from "./types.js";
|
||||
import {
|
||||
AppBridge,
|
||||
buildAllowAttribute,
|
||||
|
|
@ -13,7 +13,7 @@ import {
|
|||
isToolVisibilityAppOnly,
|
||||
McpUiOpenLinkResultSchema,
|
||||
type McpUiHostCapabilities,
|
||||
} from "./app-bridge";
|
||||
} from "./app-bridge.js";
|
||||
|
||||
/** Wait for pending microtasks to complete */
|
||||
const flush = () => new Promise((resolve) => setTimeout(resolve, 0));
|
||||
|
|
|
|||
Loading…
Reference in a new issue