Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): aedes.handle type definition #772

Merged
merged 2 commits into from
Sep 14, 2022
Merged

Conversation

ilomon10
Copy link
Contributor

Add missing type parameter of request: IncomingMessage on aedes.handle method.

aedes.js#L55

...
    matchEmptyLevels: true // [MQTT-4.7.1-3]
  })
  this.handle = function handle (conn, req) {
    conn.setMaxListeners(opts.concurrency * 2)
    // create a new Client instance for a new connection
    // return, just to please standard
...

Add missing type parameter of `request: IncomingMessage` on `aedes.handle` method.

Target file aedes.js#L55
@gnought
Copy link
Collaborator

gnought commented Aug 21, 2022

Thx for the PR.
Please modify test/types/aedes.test-d.ts to add the req param.

@ilomon10
Copy link
Contributor Author

Done.
Test passed on my local machine.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2900962178

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.824%

Totals Coverage Status
Change from base Build 2854703833: 0.0%
Covered Lines: 808
Relevant Lines: 808

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2900962178

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.824%

Totals Coverage Status
Change from base Build 2854703833: 0.0%
Covered Lines: 808
Relevant Lines: 808

💛 - Coveralls

@robertsLando robertsLando changed the title Update aedes.handle type definition fix(types): aedes.handle type definition Sep 14, 2022
@robertsLando robertsLando merged commit c80a8df into moscajs:main Sep 14, 2022
@ilomon10 ilomon10 deleted the patch-1 branch November 1, 2022 16:08
@avmarjin
Copy link

function Client (broker, conn, req) {
...
this.connDetails = req ? req.connDetails : null

for instance.d.ts need

handle: (stream: Connection, request: IncomingMessage | null) => Client

or

handle: (stream: Connection, request?: IncomingMessage) => Client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants