Skip to content

The type of WebSocketGateway's options does not work #14303

@SeraphimKaito

Description

@SeraphimKaito

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

CleanShot 2024-12-10 at 11 38 39@2x

cors has no type hints, cors2 does not show errors.

Minimum reproduction code

https://github.com/nestjs/nest/tree/master/sample/02-gateways

Steps to reproduce

No response

Expected behavior

cors has type hints, cors2 does show errors.

Package

  • I don't know. Or some 3rd-party package
  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices
  • @nestjs/platform-express
  • @nestjs/platform-fastify
  • @nestjs/platform-socket.io
  • @nestjs/platform-ws
  • @nestjs/testing
  • @nestjs/websockets
  • Other (see below)

Other package

No response

NestJS version

10.4.15

Packages versions

[System Information]
OS Version     : macOS 24.1.0
NodeJS Version : v22.12.0
PNPM Version    : 9.0.2 

[Nest CLI]
Nest CLI Version : 10.4.8 

[Nest Platform Information]
platform-socket.io version : 10.4.15
platform-express version   : 10.4.13
mapped-types version       : 2.0.6
websockets version         : 10.4.15
schematics version         : 10.2.3
testing version            : 10.4.13
common version             : 10.4.13
core version               : 10.4.13
jwt version                : 10.2.0
cli version                : 10.4.8

Node.js version

22.12

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue has not been looked into

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions