Skip to content

fix(vscode): show error on missing TypeScript lib#195

Merged
johnsoncodehk merged 3 commits intovolarjs:masterfrom
msujew:unknown-typescript
Jun 5, 2024
Merged

fix(vscode): show error on missing TypeScript lib#195
johnsoncodehk merged 3 commits intovolarjs:masterfrom
msujew:unknown-typescript

Conversation

@msujew
Copy link
Contributor

@msujew msujew commented Jun 4, 2024

Closes #122

Moves the code away from the assumption that there's always a valid TypeScript distribution available under the ${appRoot}/extensions/node_modules/typescript/lib path. While I add this change specifically for Theia, there are other (improbable) cases in which the VS Code builtin TypeScript distribution might be malformed or simply unavailable.

I believe this change is breaking as getTsdk is exported from the main index and can now also return undefined in addition to the original object type.

Note that I'm not too familiar with the project and haven't found any instructions on testing the changes. If something doesn't work as expected, please let me know how I can test my changes before I request another review :)

@johnsoncodehk
Copy link
Member

Look great! Thanks for following up!

@johnsoncodehk johnsoncodehk merged commit afd4642 into volarjs:master Jun 5, 2024
@msujew msujew deleted the unknown-typescript branch June 5, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volar fails to start in eclipse theia

2 participants