feat(core): custom-method support (3-arg setRequestHandler + request schema overload) (#1974)

This commit is contained in:
Felix Weinberger 2026-04-29 16:38:18 +01:00 • committed by GitHub
commit db83829c5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -266,7 +266,7 @@ export class Server extends Protocol<ServerContext> {
};
}
protected assertCapabilityForMethod(method: RequestMethod): void {
protected assertCapabilityForMethod(method: RequestMethod | string): void {
switch (method) {
case 'sampling/createMessage': {
if (!this._clientCapabilities?.sampling) {
@ -299,7 +299,7 @@ export class Server extends Protocol<ServerContext> {
}
}
protected assertNotificationCapability(method: NotificationMethod): void {
protected assertNotificationCapability(method: NotificationMethod | string): void {
switch (method) {
case 'notifications/message': {
if (!this._capabilities.logging) {