File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed
Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff 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 ) {
Original file line number Diff line number Diff line change 11import { JSONRPCMessage , MessageExtraInfo , RequestId } from '../types/types.js' ;
2- import type { HeadersInit } from 'undici-types' ;
32
43export 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 ) {
You can’t perform that action at this time.
0 commit comments