-
Notifications
You must be signed in to change notification settings - Fork 183
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
#1801 Refactor standalone struct service. Get rid of unnecessary Indigo-worker creation. #1803
Conversation
b3a4c86
to
03925b2
Compare
const message: OutputMessage<string> = e.data | ||
if (message.type !== undefined) { | ||
const event = messageTypeToEventMapping[message.type] | ||
console.log(`emitted event ${event}`) |
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.
Could you remove console.log
pls?
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.
Okay, I thought that was intentional.
@@ -460,7 +490,10 @@ class IndigoService implements StructService { | |||
data: commandData | |||
} | |||
|
|||
worker.postMessage(inputMessage) | |||
this.EE.removeListener('calculateCip', action) |
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.
What do you think about replacing string literal with enum
for example :
this.EE.removeListener(ListenerType.CalculateCip, action)
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.
Good proposal :) Will do
No description provided.