apply suggested changes
This commit is contained in:
parent
f900592a2f
commit
f1c5ef1a8d
2 changed files with 14 additions and 28 deletions
|
|
@ -22,7 +22,7 @@ import {
|
|||
Result,
|
||||
ServerCapabilities,
|
||||
} from "../types.js";
|
||||
import { Transport } from "./transport.js";
|
||||
import { Transport, TransportSendOptions } from "./transport.js";
|
||||
|
||||
/**
|
||||
* Callback for progress notifications.
|
||||
|
|
@ -82,26 +82,7 @@ export type RequestOptions = {
|
|||
* If not specified, there is no maximum total timeout.
|
||||
*/
|
||||
maxTotalTimeout?: number;
|
||||
|
||||
/**
|
||||
* May be used to indicate to the transport which incoming request to associate this outgoing request with.
|
||||
*/
|
||||
relatedRequestId?: RequestId;
|
||||
|
||||
/**
|
||||
* The resumption token used to continue long-running requests that were interrupted.
|
||||
*
|
||||
* This allows clients to reconnect and continue from where they left off, if supported by the transport.
|
||||
*/
|
||||
resumptionToken?: string;
|
||||
|
||||
/**
|
||||
* A callback that is invoked when the resumption token changes, if supported by the transport.
|
||||
*
|
||||
* This allows clients to persist the latest token for potential reconnection.
|
||||
*/
|
||||
onresumptiontoken?: (token: string) => void;
|
||||
};
|
||||
} & TransportSendOptions;
|
||||
|
||||
/**
|
||||
* Options that can be given per notification.
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
import { JSONRPCMessage, RequestId } from "../types.js";
|
||||
|
||||
/**
|
||||
* Options for sending a JSON-RPC message.
|
||||
*/
|
||||
export interface TransportSendOptions {
|
||||
* Options for sending a JSON-RPC message.
|
||||
*/
|
||||
export type TransportSendOptions = {
|
||||
/**
|
||||
* If present, `relatedRequestId` is used to indicate to the transport which incoming request to associate this outgoing message with.
|
||||
*/
|
||||
*/
|
||||
relatedRequestId?: RequestId;
|
||||
|
||||
/**
|
||||
* The resumption token used to continue long-running requests that were interrupted.
|
||||
*
|
||||
* This allows clients to reconnect and continue from where they left off, if supported by the transport.
|
||||
*/
|
||||
resumptionToken?: string;
|
||||
|
||||
/**
|
||||
* A callback that is invoked when the resumption token changes, if supported by the transport.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue