feat(compat): export InMemoryTransport from public API surface (#1834)

Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
This commit is contained in:
Felix Weinberger 2026-04-27 13:24:05 +01:00 • committed by GitHub
commit 42cb6b2b72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View file

@ -70,6 +70,7 @@ export { deserializeMessage, ReadBuffer, serializeMessage } from '../../shared/s
// Transport types (NOT normalizeHeaders)
export type { FetchLike, Transport, TransportSendOptions } from '../../shared/transport.js';
export { createFetchWithInit } from '../../shared/transport.js';
export { InMemoryTransport } from '../../util/inMemory.js';
// URI Template
export type { Variables } from '../../shared/uriTemplate.js';

View file

@ -9,6 +9,9 @@ interface QueuedMessage {
/**
* In-memory transport for creating clients and servers that talk to each other within the same process.
*
* Intended for testing and development. For production in-process connections, use
* `StreamableHTTPClientTransport` against a local server URL.
*/
export class InMemoryTransport implements Transport {
private _otherTransport?: InMemoryTransport;