Unswap arguments#20212
Conversation
|
👍 |
|
|
||
| private writeToEventSocket(body: any, eventName: string): void { | ||
| this.eventSocket.write(formatMessage(toEvent(body, eventName), this.logger, this.byteLength, this.host.newLine), "utf8"); | ||
| this.eventSocket.write(formatMessage(toEvent(eventName, body), this.logger, this.byteLength, this.host.newLine), "utf8"); |
There was a problem hiding this comment.
type of body should be object on twoEvent, as well as on writeToEventSocket. that should flag invalid uses like these in the future.
There was a problem hiding this comment.
{} is the top-type.. a string is assignable to {} since it has no required properties..
object is the non-primitive object, i.e. something that is not string, number, boolean, or symbol
There was a problem hiding this comment.
Both callers have body: T, which seems not to be assignable to object. Do I need to make an additional change to make that work?
|
for some reason github does not like my comments, and think they are outdated.. so reposting:
|
|
I'll port this to 2.6 tomorrow. |
|
I do not think the original change was ported to 2.6 |
|
Yes, I didn't port the original change. |
|
Even better 😄 |
VS is ignoring all events because the event name is currently in the
bodyfield. As a result, projects are not refreshed when typings are installed.