-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Set typescript.tsdk
so VSCode's TS language features work properly
#4143
base: main
Are you sure you want to change the base?
Conversation
typescript.tsdk
so VSCode's TS language features work properly
I think there might be something particular to your local setup that's involved here. I don't see any lint errors in VS Code currently. |
Do you have |
Also, if you open up this line in VSCode: shiny/srcts/src/bindings/input/selectInput.ts Line 204 in abf7138
and hover over or....never mind, I can't seem to reproduce the old behavior anymore, even after switching back to main. But it used to say |
Messing with the settings appears to have kicked my VS Code into the "use workspace version" state, but is not generally needed to do so, since apparently there's an actual menu 🤦♂️. |
...actually it turns out, selecting the setting in the UI just automatically adds this line to to the project's settings.json file. So this does need to be here for it to work right (I think?) |
...but if I revert the change to settings.json and reload VSCode then it keeps using the right version anyways??? |
EDIT 2: Setting the typescript version in the UI actually just creates this line in the settings.json file under the hood.
EDIT 3: but it seems to keep the right version even if you subsequently revert that change to settings.json ???
EDIT: The real solution to the problem I was having was simply to configure the TypeScript version used, via VSCode UI. Hit the braces on the bottom right:
Then "Select Version":
Then "Use Workspace Version".
This prevents spurious linting warnings, and makes type detection work properly with the complex constructions used in some places.