@nestjs/websockets
Version:
WebSockets for NestJS: gateways with message handlers, guards, pipes and interceptors, on Socket.IO or ws.
20 lines (19 loc) • 877 B
TypeScript
import type { ArgumentsHost } from '@nestjs/common';
import { WsException } from '../errors/ws-exception.js';
import { BaseWsExceptionFilter } from './base-ws-exception-filter.js';
import { type ExceptionFilterMetadata } from '@nestjs/common/internal';
/**
* @publicApi
*/
export declare class WsExceptionsHandler extends BaseWsExceptionFilter {
private filters;
private readonly pendingFilterResults;
/**
* Returns the promise of an asynchronous exception filter. The exception is
* being handled until it settles, so callers wait for it: the adapters
* count the message as being handled until then.
*/
handle(exception: Error | WsException, host: ArgumentsHost): void | PromiseLike<unknown>;
setCustomFilters(filters: ExceptionFilterMetadata[]): void;
invokeCustomFilters<T = any>(exception: T, args: ArgumentsHost): boolean;
}