typescript-language-server does not work with @typescript/typescript6

Abierto Apto para principiantes
#64,094 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Comienza en el directorio lib del paquete de compatibilidad @typescript/typescript6 y compara el wrapper tsc.js existente con el punto de entrada tsserver.js que falta. Añade el punto de entrada de compatibilidad tsserver.js correspondiente y verifica que typescript-language-server se inicie con el paquete.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

🔎 Search Terms

lsp language server tsserver.js

🕗 Version & Regression Information
  • This is an issue with the new @typescript/typescript6 package
⏯ Playground Link

No response

💻 Code

No response

🙁 Actual behavior

I have installed both TypeScript 6 and 7 side to side following the blog post.
Unfortunately, typescript-language-server (which is a LSP wrapper around tsserver from TypeScript 6) does not work in this setup. It is looking for a tsserver.js file in node_modules/typescript/lib, which does not exist in @typescript/typescript6.

🙂 Expected behavior

The @typescript/typescript6 package is for compatibility with software based on TypeScript 6, so it should include a tsserver.js executable. I believe the only thing needed is to add a tsserver.js file in the lib directory containing:

require("@typescript/old/lib/tsserver.js");

(same pattern as the existing tsc.js file)
I tested it and typescript-language-server does start when adding this file.

Additional information about the issue

I know that TypeScript 7 includes a new native LSP server, but it does not have all the features that tsserver had. In particular the lack of code actions like "Move to file" make it so that I want to be able to switch between the old and the new server until the new server reaches feature parity.

Lenguaje dominante
Go
Estrellas
111k
Forks
14.4k
Merge medio
1 d 19 h
PR fusionados (30 d)
117

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/TypeScript

Todos los issues de microsoft/TypeScript

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.