-
Notifications
You must be signed in to change notification settings - Fork 58
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
refactor: continue pubsub/content types started in #1352 #1362
Conversation
DefaultPubsubTopic*: PubsubTopic = PubsubTopic("/waku/2/default-waku/proto") | ||
DefaultContentTopic*: ContentTopic = ContentTopic("/waku/2/default-content/proto") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant and not necessary, the types are not distinct string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, thought it was nice for reference, so that people declaring topics they would see this and follow the pattern:
let x = PubsubTopic("x/y/z/a")
instead of let y = "x/y/z/a"
which I would say its bad practise?
no strong opinion about it, though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is redundant since the variable is already type annotated:
DefaultPubsubTopic*: PubsubTopic = PubsubTopic("/waku/2/default-waku/proto")
#~~~~~~~~~~~~~~~~~~~~~~~~~^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks.
Summary:
PubsubTopic
andContentTopic
fields.PubsubTopicString
and its usages.defaultPubsubTopics
instead ofdefaultTopics
As a general note, which I think @LNSD agrees with me, we should be specific using
pubsub
orcontent
instead of just usingtopic
. As it may be confusing.