Skip to content

Type definitions are not loaded immediately after tsserver startup when using createAsyncLanguageServicePlugin #254

@mizdra

Description

@mizdra

Summary

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.

How to repdoduce

reproduction: mizdra/playground-volar-typescript-service-plugin@e73b0e1

  1. Checkout mizdra/playground-volar-typescript-service-plugin@e73b0e1
  2. Open workspace on VS Code
  3. When the tsdk switching prompt appears, select "Allow".
  4. Open example/index.ts in the tab
  5. Restart tsserver
2024-12-08.18.38.50.mov

Expected behavior

tsserver loads the type definitions of ts-logo-256.png.

Actual behavior

tsserver does not load the type definitions of ts-logo-256.png. When import specifier is changed, the tsserver loads the type definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions