Skip to content
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

The program object in the strict language service is no longer undefined #74

Closed
wants to merge 1 commit into from

Conversation

kamkry
Copy link
Collaborator

@kamkry kamkry commented Apr 25, 2024

The TypeScript instance retrieved from PluginModuleFactory parameters didn't match the one imported from typescript/lib/tsserverlibrary, causing the createLanguageService function to return a broken service with no program object inside.

The solution standardizes the usage to utilize a single instance of TypeScript and eliminates the .getProgram call since it's a getter function that doesn't perform any action.

@KostkaBrukowa
Copy link
Collaborator

Ye it works well for me

@KostkaBrukowa
Copy link
Collaborator

KostkaBrukowa commented Apr 26, 2024

@kamkry or it doesn't. It fixed issue that was appearing on 5.2.2 but it didnt fix for 5.4. I've bring back e2e tests and it seems that they fail on typescript 5.4.5 and they work on 5.2.2 so it must be something different #75
Also it seems that this line

return strictLanguageService.getSemanticDiagnostics(filePath);
causes this issue after some debugging

@KostkaBrukowa
Copy link
Collaborator

Done in #75

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.

Typescript server crash when using typescript-strict-plugin with Typescript 5.4
2 participants