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

donot support nats user password and there is error if run tsc #3

Open
stockjava1 opened this issue Feb 10, 2023 · 2 comments
Open

Comments

@stockjava1
Copy link

`export default class NatsIoClient {
servers: string[]
conn?: NatsConnection

constructor(servers: string[]) {
this.servers = servers
}

public async initialize() {
this.conn = await connect({
servers: this.servers,
noEcho: true,
})
console.log(connected to ${this.conn.getServer()})
this.eventListener(this.conn)
}
//......
}`

This class don't support to initialize nats with username and password, could you update to support it? Thanks a lot.

@stockjava1
Copy link
Author

there is error when i run tsc.

tsc -p tsconfig.build.json
lib/module/msgPackModule.ts:27:12 - error TS2339: Property 'uid' does not exist on type 'unknown'.

27 const {uid, packet, opts} = decode(msg)
~~~

lib/module/msgPackModule.ts:27:17 - error TS2339: Property 'packet' does not exist on type 'unknown'.

27 const {uid, packet, opts} = decode(msg)
~~~~~~

lib/module/msgPackModule.ts:27:25 - error TS2339: Property 'opts' does not exist on type 'unknown'.

27 const {uid, packet, opts} = decode(msg)
~~~~

Found 3 errors in the same file, starting at: lib/module/msgPackModule.ts:27

@stockjava1 stockjava1 changed the title donot support nats user password donot support nats user password and there is error if run tsc Feb 10, 2023
@distrue
Copy link
Owner

distrue commented Mar 15, 2023

Thanks for your interest in this project.
This issue will be updated in about a month!

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

No branches or pull requests

2 participants