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: typescript types issues #812

Merged
merged 7 commits into from
Mar 1, 2023
Merged

fix: typescript types issues #812

merged 7 commits into from
Mar 1, 2023

Conversation

robertsLando
Copy link
Member

@robertsLando robertsLando commented Feb 28, 2023

Also renamed Aedes alias function Server to createBroker

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4295152793

  • 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.739%

Totals Coverage Status
Change from base Build 3911640084: 0.0%
Covered Lines: 816
Relevant Lines: 816

💛 - Coveralls

@coveralls
Copy link

coveralls commented Feb 28, 2023

Pull Request Test Coverage Report for Build 4301288778

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.739%

Totals Coverage Status
Change from base Build 3911640084: 0.0%
Covered Lines: 816
Relevant Lines: 816

💛 - Coveralls

@robertsLando robertsLando merged commit a5c09b2 into main Mar 1, 2023
@robertsLando robertsLando deleted the fix-types branch March 1, 2023 08:35
@erwinschrodinger1
Copy link

Still having this issue:

  Overload 1 of 2, '(connectionListener?: (socket: Socket) => void): Server', gave the following error.
    Argument of type '(stream: Connection, request: IncomingMessage) => Client' is not assignable to parameter of type '(socket: Socket) => void'.
  Overload 2 of 2, '(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server', gave the following error.
    Type '(stream: Connection, request: IncomingMessage) => Client' has no properties in common with type 'ServerOpts'.ts(2769)

Code:

import Aedes from 'aedes'
import net from 'net'
const aedes = new Aedes()
const mqttServer: net.Server = net.createServer(aedes.handle)
mqttServer.listen(MQTTPORT, () => {
    console.log(
        `Aedes MQTT broker started and listening on MQTTPORT ${MQTTPORT}`
    );
});

Used packages:
"aedes": "^0.49.0"
"net": "^1.0.2"

@robertsLando
Copy link
Member Author

PR?

@erwinschrodinger1
Copy link

erwinschrodinger1 commented May 15, 2023

Sorry for commenting before checking the problem twice. I restarted my VS-Code and error disappeared like a magic.

I apologize for my mistake !

@robertsLando
Copy link
Member Author

No worries :)

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

Successfully merging this pull request may close these issues.

3 participants