File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1126,14 +1126,14 @@ export abstract class Protocol<ContextT extends BaseContext> {
11261126 /**
11271127 * Removes the request handler for the given method.
11281128 */
1129- removeRequestHandler ( method : string ) : void {
1129+ removeRequestHandler ( method : RequestMethod | string ) : void {
11301130 this . _requestHandlers . delete ( method ) ;
11311131 }
11321132
11331133 /**
11341134 * Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.
11351135 */
1136- assertCanSetRequestHandler ( method : string ) : void {
1136+ assertCanSetRequestHandler ( method : RequestMethod | string ) : void {
11371137 if ( this . _requestHandlers . has ( method ) ) {
11381138 throw new Error ( `A request handler for ${ method } already exists, which would be overridden` ) ;
11391139 }
@@ -1192,7 +1192,7 @@ export abstract class Protocol<ContextT extends BaseContext> {
11921192 /**
11931193 * Removes the notification handler for the given method.
11941194 */
1195- removeNotificationHandler ( method : string ) : void {
1195+ removeNotificationHandler ( method : NotificationMethod | string ) : void {
11961196 this . _notificationHandlers . delete ( method ) ;
11971197 }
11981198}
You can’t perform that action at this time.
0 commit comments