Clean up and document createLanguageServicePlugin and createAsyncLanguageServicePlugin#261
Conversation
| .flat(); | ||
|
|
||
| // TODO: this logic does not seem to appear in the async variant | ||
| // (createAsyncLanguageServicePlugin)... bug? |
There was a problem hiding this comment.
OPEN QUESTION: is it a bug that the async variant (createAsyncLanguageServicePlugin) does not add the extensions passed in to projectExternalFileExtensions? (This is also how it was prior to this PR).
There was a problem hiding this comment.
This is intentional, in the case of async this will cause some internal error in the tsserver, which is why we need to explicitly pass the required extensions in createAsyncLanguageServicePlugin parameters.
| if (updateLevel >= (1 satisfies ts.ProgramUpdateLevel.RootNamesAndUpdate) | ||
| || !externalFiles.has(project)) { | ||
| const oldFiles = externalFiles.get(project); | ||
| const extensions = projectExternalFileExtensions.get(project); |
There was a problem hiding this comment.
This is where we check projectExternalFileExtensions (see other comment)
|
LGTM, thank you! I've found that using jiti solves the need to asynchronously import esm modules in synchronous code, and if this works for MDX and glint cases, we might remove |
No description provided.