v5: How to define the type of a client object? #1725
Unanswered
tukusejssirs
asked this question in
Q&A
Replies: 1 comment 2 replies
-
MqttClient type should be fine here, maybe the error is:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using
[email protected]
. I have a variable-length array of MQTT clients.It does not matter if I add
as unknown
, as I get these errors regardless.I get these errors at least on
subscribe()
,on()
andend()
methods.What is the correct way to define the client object? I’d prefer doing it as simply as
typeof MqttClient
, however, I’d be okay withany type definition.Thanks in advance! 🙏
Beta Was this translation helpful? Give feedback.
All reactions