Closed hyx0329 closed 4 months ago
Hmm the two should def. not behave differently :/
Let me see... Oh! It seems let ... in
will also iterate over the properties of the object. Look at this:
index
is the string distinct
XD
@hyx0329 This is a good catch, and reading about it a bit more about TS handling lists, it kinda makes sense. I personally think Typescript should be less 'subtle' about this.
Do you want to PR a fix, or would you prefer one of us to just apply your patch?
Extension version: 0.23.0 VSCode version:
No RTT terminal is opened even when RTT is configured correctly.
It seems there's a mistake in
createRttTerminal
: https://github.com/probe-rs/vscode/blob/23f7b8a434027754d34864154dcb880da2924e18/src/extension.ts#L200-L205The
index
will be a string('distinct') rather than a number, while getting element of a list(rttTerminals
) requires a number. This causes an exception raised.I'm not familiar with TS but I've tested the following patch:
Then the RTT terminal comes up.