mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore(websockets): mark facing apis public in websockets
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { WsParamtype } from '../enums/ws-paramtype.enum';
|
||||
import { createWsParamDecorator } from '../utils/param.utils';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export const ConnectedSocket: () => ParameterDecorator = createWsParamDecorator(
|
||||
WsParamtype.SOCKET,
|
||||
);
|
||||
|
||||
@@ -4,6 +4,8 @@ import { GatewayMetadata } from '../interfaces';
|
||||
/**
|
||||
* Decorator that marks a class as a Nest gateway that enables real-time, bidirectional
|
||||
* and event-based communication between the browser and the server.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function WebSocketGateway(port?: number): ClassDecorator;
|
||||
export function WebSocketGateway<
|
||||
|
||||
@@ -2,6 +2,8 @@ import { MESSAGE_MAPPING_METADATA, MESSAGE_METADATA } from '../constants';
|
||||
|
||||
/**
|
||||
* Subscribes to messages that fulfils chosen pattern.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const SubscribeMessage = <T = string>(message: T): MethodDecorator => {
|
||||
return (
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export interface WsResponse<T = any> {
|
||||
event: string;
|
||||
data: T;
|
||||
|
||||
Reference in New Issue
Block a user