* In sse.test.ts
- More specific expectations in test "uses custom fetch implementation from options" * In sse.ts - Import FetchLike from transport.ts * In steramableHttp.ts - Import FetchLike from transport.ts - Export StartSSEOptions interface for testing * In streamableHttp.test.ts - import StartSSEOptions from streamableHttp.ts - use StartSSEOptions instead of any in test "uses custom fetch implementation" * In transport.ts - Add FetchLike function type
This commit is contained in:
parent
242c8248f7
commit
f383a9cb8c
1 changed files with 18 additions and 18 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import { EventSource, type ErrorEvent, type EventSourceInit } from "eventsource";
|
||||
import { Transport } from "../shared/transport.js";
|
||||
import { Transport, FetchLike } from "../shared/transport.js";
|
||||
import { JSONRPCMessage, JSONRPCMessageSchema } from "../types.js";
|
||||
import { auth, AuthResult, extractResourceMetadataUrl, OAuthClientProvider, UnauthorizedError } from "./auth.js";
|
||||
|
||||
export type FetchLike = (url: string | URL, init?: RequestInit) => Promise<Response>;
|
||||
|
||||
export class SseError extends Error {
|
||||
constructor(
|
||||
public readonly code: number | undefined,
|
||||
|
|
|
|||
Loading…
Reference in a new issue