socketio / socketio/socket.io

[Feature] eventNames support

Open
#4,626 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
63.2k
Forks
10.3k
Avg merge
11d 20h
Merged PRs (30d)
2

Description

Is your feature request related to a problem? Please describe.

As a universal wrapper for agnostic runtime, we use emitter.eventNames(). But for socket.io this function is not implemented

Describe the solution you'd like

expose eventNames() function which returns an array of built-in events. ['error', 'ping', 'reconnect', 'reconnect_attempt', 'reconnect_error', 'reconnect_failed']

Describe alternatives you've considered
None

Additional context
I know that related WebAPI this field is not exposed, but it's be very helpful for wrapper libraries

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the Socket.IO client event API and its event-emitter implementation, then compare the requested behavior with Node.js eventNames(). Done means an exposed eventNames() function returns the listed built-in events, with coverage for that result.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.