http/sse.decorator.ts

nest · packages/common/decorators/http/sse.decorator.ts · typescript · MIT
realtime, tag:knn-classified

Module exposing: Sse

// Source: https://github.com/nestjs/nest | License: MIT | Copyright 2017-present Kamil Mysliwiec <https://kamilmysliwiec.com>
// Provided via justclaw.it.com; keep this notice with the code.
import {
  METHOD_METADATA,
  PATH_METADATA,
  SSE_METADATA,
  SSE_OPTIONS_METADATA,
} from '../../constants.js';
import { RequestMethod } from '../../enums/request-method.enum.js';

/**
 * Interface defining options that can be passed to `@Sse()` decorator
 *
 * @publicApi
 */
export interface SseOptions {
  /**
   * HTTP request method of the route (default: `RequestMethod.GET`).
   */
  method?: RequestMethod;

  /**
   * Maximum number of characters of event data (`data` plus `comment`) that
   * may wait for a client that is not reading its events (default:
   * 4 * 1024 * 1024, i.e. 4M character

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key