You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior immediately after tsserver initialization is different between createAsyncLanguageServicePlugin and createLanguageServicePlugin.
In createLanguageServicePlugin, tsserver loads the type definitions of the files that Volar.js processes. However, createAsyncLanguageServicePlugin does not.
A quick look, createAsyncLanguageServicePlugin relies on using markAsDirty to refresh diagnostics after initialization, the problem may be that markAsDirty is no longer working now. (I haven't tried the repro case yet.)
It seems to be caused by starting from a certain TS version, the module resolved cache of a file will only be updated when the file content is changed. (Still digging for a solution.)
Summary
The behavior immediately after
tsserver
initialization is different betweencreateAsyncLanguageServicePlugin
andcreateLanguageServicePlugin
.In
createLanguageServicePlugin
,tsserver
loads the type definitions of the files that Volar.js processes. However,createAsyncLanguageServicePlugin
does not.How to repdoduce
reproduction: mizdra/playground-volar-typescript-service-plugin@e73b0e1
example/index.ts
in the tab2024-12-08.18.38.50.mov
Expected behavior
tsserver
loads the type definitions ofts-logo-256.png
.Actual behavior
tsserver
does not load the type definitions ofts-logo-256.png
. When import specifier is changed, the tsserver loads the type definition.The text was updated successfully, but these errors were encountered: