Skip to content

Commit 647e5f0

Browse files
committed
save commit
1 parent a089abc commit 647e5f0

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

packages/client/src/client/sse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class SSEClientTransport implements Transport {
114114
}
115115

116116
private async _commonHeaders(): Promise<Headers> {
117-
const headers: Record<string, string> = {};
117+
const headers: RequestInit['headers'] & Record<string, string> = {};
118118
if (this._authProvider) {
119119
const tokens = await this._authProvider.tokens();
120120
if (tokens) {

packages/client/src/client/streamableHttp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export class StreamableHTTPClientTransport implements Transport {
187187
}
188188

189189
private async _commonHeaders(): Promise<Headers> {
190-
const headers: Record<string, string> = {};
190+
const headers: RequestInit['headers'] & Record<string, string> = {};
191191
if (this._authProvider) {
192192
const tokens = await this._authProvider.tokens();
193193
if (tokens) {

packages/core/src/shared/transport.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { JSONRPCMessage, MessageExtraInfo, RequestId } from '../types/types.js';
2-
import type { HeadersInit } from 'undici-types';
32

43
export type FetchLike = (url: string | URL, init?: RequestInit) => Promise<Response>;
54

65
/**
76
* Normalizes HeadersInit to a plain Record<string, string> for manipulation.
87
* Handles Headers objects, arrays of tuples, and plain objects.
98
*/
10-
export function normalizeHeaders(headers: HeadersInit | undefined): Record<string, string> {
9+
export function normalizeHeaders(headers: RequestInit['headers'] | undefined): Record<string, string> {
1110
if (!headers) return {};
1211

1312
if (headers instanceof Headers) {

0 commit comments

Comments
 (0)