Adapter method should return a Promise | void
Nobody has claimed this yet.
- 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.
Some Adapter method return void only that make customized adapter implementer have trouble on implementing.
E.g. io.socketsJoin() and inner adapter's method addSockets and delSockets currently return void which brings troubles for new adapter implementer as the adapter may not be able to do it synchronized.
Describe the solution you'd like
Return Promise | void instead of void and thus let adapter implementer decide whether it should be async.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the io.socketsJoin() entry point and the adapter methods addSockets and delSockets, then trace their TypeScript signatures and callers. Update the relevant return types to support Promise | void and verify that both synchronous and asynchronous adapter implementations behave correctly through the existing test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100